Home Forums Software Development Issue integrating EyeX into current game

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #3841

    NullReferenceException: Object reference not set to an instance of an object.

    A you can see, I have a camera in the scene and yet, it’s not recognizing the Gaze Aware component. I have the gaze aware component attached to the sphere that you can see in this screen. Interestingly I replaced the original “ball” with this just to start from scratch with my ball controller, and am having the same issues. I have tried this in another “sample” project I created and the script works fine. I have made sure that the variables, scripts, etc, or all named appropriately and are not misspelled. I changed the camera, as before the camera followed the object (RollerBall) and I thought that could be the issue but to no avail. I don’t understand why I’m getting this error message. Any info would be greatly appreciated.

    I have a simple script attached to the sphere:
    using UnityEngine;
    using System.Collections;

    public class MoveSphere : MonoBehaviour
    private GazeAwareComponent _gazeAware;
    public float speed = 5.0f;

    void Start()
    _gazeAware = GetComponent<GazeAwareComponent>();

    void Update()
    if (_gazeAware.HasGaze)
    transform.Translate(Vector3.forward * Time.deltaTime * speed);

    Again this worked fine in another project, just not in the current one. Please help!


    You actually can not see the camera component in this scene, but I can assure you it is there.

    Jenny [Tobii]

    Hi Richard,

    Please, see my reply in the other forum thread and see if that helps you:

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.