// Use this for initialization void Start() { cam = GameObject.Find("CenterEyeAnchor").GetComponent <Camera>(); player = GameObject.Find("OVRPlayerController"); memCreation = GameObject.Find("MemoryManager").GetComponent <MemoryCreation>(); memoryWorld.SetActive(false); playMemory = false; currentBlock = 0; blocks = new Transform[moveBlocks.transform.childCount]; for (int i = 0; i < moveBlocks.transform.childCount; i++) { blocks[i] = moveBlocks.transform.GetChild(i); } }
protected virtual void Start() { if (gameStarted) { memCreation = GameObject.Find("MemoryManager").GetComponent <MemoryCreation>(); } m_lastPos = transform.position; m_lastRot = transform.rotation; if (m_parentTransform == null) { if (gameObject.transform.parent != null) { m_parentTransform = gameObject.transform.parent.transform; } else { m_parentTransform = new GameObject().transform; m_parentTransform.position = Vector3.zero; m_parentTransform.rotation = Quaternion.identity; } } }