private void Start() { _animator = GetComponent <Animator>(); //_pointerContoller = FindObjectOfType<PointerController>(); handPos = GameObject.FindGameObjectWithTag("handPos").GetComponent <Transform>(); pointerScript = FindObjectOfType <PointerScript>(); }
/* * createInfoScreen creates a new info screen * <param name="type">type of info screen</param> */ public void createInfoScreen(string type) { // get last coords of pointerscript //float[] coords = GameObject.FindGameObjectWithTag("rightController").GetComponent<PointerScript>().getLastCoords(); float[] coords = PointerScript.getLastCoords(); GameObject newScreen; // Init new InfoScreen //VRTK.Infoscreen newScreen = gameObject.AddComponent<VRTK.Infoscreen>(); newScreen = new GameObject("Infoscreen Prototype"); VRTK.Infoscreen newInfoScreen = newScreen.AddComponent <VRTK.Infoscreen>(); // initialize infoscreen with gicen coords and parameter newInfoScreen.init(coords[0], coords[1], type); // add info screen to arraylist this.infoscreens.Add(newInfoScreen); currentCanvasCount++; }
// Start is called before the first frame update void Start() { pointerInfo = FindObjectOfType <PointerScript>(); speed = walkSpeed; }
// Use this for initialization void Start() { reference = this.gameObject; instance = this; mainCamera = GameObject.Find("Main Camera").transform; }