Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

I got an error and I don't know what to do...

$
0
0
Hi, I'm trying to program gamepad support and it was going well until I started programming the input for pushing down the left joystick on an xbox one controller,, and I got this error massage: "NullReferenceException: Object reference not set to an instance of an object. " and I dont know what to do.... heres the area of code were the error is - `buttonInput = GetComponent(); bool lPushed = buttonInput.leftStickPushed; // <--- apparently this is the wrong part....` and this is the W.I.P input script - `using UnityEngine; using System.Collections; public class GamepadSetup : MonoBehaviour { //create gamepad input public bool leftStickPushed = Input.GetKey(KeyCode.Joystick1Button8); public bool rightStickPushed = Input.GetKey(KeyCode.Joystick1Button9); }` thanks! Jack

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>