// Use this for initialization void Awake() { handDraggingComp = gameObject.GetComponent <HandDragging>(); handRotateComp = gameObject.GetComponent <HandRotate>(); handResizeComp = gameObject.GetComponent <HandResize>(); gameManagerComp = GameObject.Find("Managers").GetComponent <GameManager>(); }
// Use this for initialization void Start() { defaultShader = this.GetComponent <Renderer>().material.shader; x = Shader.Find("Legacy Shaders/Self-Illumin/Bumped Diffuse"); GameObject grandParent = this.gameObject.transform.parent.gameObject.transform.parent.gameObject; //Debug.Log(grandParent); rotateScript = grandParent.GetComponent <HandRotate>(); }
public override void Start() { base.Start(); dragScript = interactiveArea.GetComponent <HandDragging>(); scaleScript = interactiveArea.GetComponent <HandResize>(); rotateScript = interactiveArea.GetComponent <HandRotate>(); ActivateManipulation((int)ManipulationType.DRAG); }
private void Start() { if (HostTransform == null) { HostTransform = transform; } mainCamera = Camera.main; scriptHandRotate = this.GetComponent <HandRotate>(); //get script HandRotate }