void Awake() { lineRend = GetComponent <LineRenderer>(); linePoints = new Vector3[2]; // if not passed, try to find in parents if (!vrPointer) { vrPointer = GetComponentInParent <VrPointer>(); } if (!vrPointer) { throw new System.Exception("VrPointer missing"); } }
void Start() { lineRend = GetComponent <LineRenderer>(); targetObj = transform.GetChild(0).gameObject; vrPointer = pointerHand.GetComponent <VrPointer>(); if (lineRend == null) { Debug.LogError("Make sure the target has a Line Renderer"); } // set number of points lineRend.positionCount = numArcPoints; // points vector arcPoints = new Vector3[numArcPoints]; HideTarget(); }
void Awake() { vrPointer = GetComponent <VrPointer>(); }