private void Start() { if (UseThisAs != InteractionRayType.None) { CreateInteractionRayObject(); } original_UseAs = UseThisAs; }
private void CreateInteractionRayObject() { if (GameObject.Find(UseThisAs.ToString()) != null) { Debug.LogError(UseThisAs.ToString() + " is set by multiple gaze sources in the scene"); } else { GameObject newObj = new GameObject(UseThisAs.ToString()); //Add Components newObj.AddComponent <InteractionRay> (); } original_UseAs = UseThisAs; }