GazeInputModule.UpdateReticle C# (CSharp) Method

UpdateReticle() private method

private UpdateReticle ( GameObject previousGazedObject ) : void
previousGazedObject GameObject
return void
    void UpdateReticle(GameObject previousGazedObject)
    {
        if (gazePointer == null) {
          return;
        }

        Camera camera = pointerData.enterEventCamera; // Get the camera
        GameObject gazeObject = GetCurrentGameObject(); // Get the gaze target
        Vector3 intersectionPosition = GetIntersectionPosition();
        bool isInteractive = pointerData.pointerPress != null ||
        ExecuteEvents.GetEventHandler<IPointerClickHandler>(gazeObject) != null;

        if (gazeObject == previousGazedObject) {
          if (gazeObject != null) {
        gazePointer.OnGazeStay(camera, gazeObject, intersectionPosition, isInteractive);
          }
        } else {
          if (previousGazedObject != null) {
        gazePointer.OnGazeExit(camera, previousGazedObject);
          }

          if (gazeObject != null) {
        gazePointer.OnGazeStart(camera, gazeObject, intersectionPosition, isInteractive);
          }
        }
    }