// Use this for initialization void Start() { AttachCorrectCameraModule(); meshFieldGeneratorScript = (MeshFieldGeneratorScript)GameObject.Find("MainMeshField").GetComponent("MeshFieldGeneratorScript"); GameObject[] tempCameraObjectArray = GameObject.FindGameObjectsWithTag("MainCamera"); for (int i = 0; i < tempCameraObjectArray.Length; i++) { mainCameraComponentList.Add((Camera)tempCameraObjectArray[i].GetComponent("Camera")); } //mainCameraComponent = (Camera)GameObject.Find("Main Camera").GetComponent("Camera"); for (int i = 0; i < tempCameraObjectArray.Length; i++) { bloomScriptList.Add((Bloom)tempCameraObjectArray[i].GetComponent("Bloom")); } GameObject[] meshLightsObjectsArray = GameObject.FindGameObjectsWithTag("MeshLight"); for (int i = 0; i < meshLightsObjectsArray.Length; i++) { meshLightsList.Add((Light)(meshLightsObjectsArray[i]).GetComponent("Light")); } creatureManagerEmittedParts = (CreatureManagerEmittedParts)GameObject.FindWithTag("CreatureManager").GetComponent("CreatureManagerEmittedParts"); editor = (GeneralEditorScript)GameObject.FindWithTag("Editor").GetComponent("GeneralEditorScript"); Screen.showCursor = false; Screen.lockCursor = true; }
// Use this for initialization void Start() { gameObject.AddComponent("MeshFilter"); gameObject.AddComponent("MeshRenderer"); mesh = GetComponent <MeshFilter>().mesh; meshFieldGeneratorScript = (MeshFieldGeneratorScript)GameObject.Find("MainMeshField").GetComponent("MeshFieldGeneratorScript"); audioDirector = (AudioDirectorScript)GameObject.FindWithTag("AudioDirector").GetComponent("AudioDirectorScript"); }
// Use this for initialization void Start() { gameObject.AddComponent("MeshFilter"); gameObject.AddComponent("MeshRenderer"); mesh = GetComponent<MeshFilter>().mesh; meshFieldGeneratorScript = (MeshFieldGeneratorScript)GameObject.Find("MainMeshField").GetComponent("MeshFieldGeneratorScript"); audioDirector = (AudioDirectorScript) GameObject.Find("AudioDirector").GetComponent("AudioDirectorScript"); }
// Use this for initialization void Start() { meshFieldGeneratorScript = (MeshFieldGeneratorScript)GameObject.Find("MainMeshField").GetComponent("MeshFieldGeneratorScript"); mainCameraComponent = (Camera)GameObject.Find("Main Camera").GetComponent("Camera"); bloomScript = (Bloom)GameObject.Find("Main Camera").GetComponent("Bloom"); GameObject[] meshLightsObjectsArray = GameObject.FindGameObjectsWithTag("MeshLight"); for (int i = 0; i < meshLightsObjectsArray.Length; i++) { meshLightsList.Add((Light)(meshLightsObjectsArray[i]).GetComponent("Light")); } creatureManagerScript = (CreatureManagerScript)GameObject.Find("CreatureManager").GetComponent("CreatureManagerScript"); mainCameraGameObject = GameObject.Find("Main Camera"); }
// Use this for initialization void Start() { AttachCorrectCameraModule(); meshFieldGeneratorScript = (MeshFieldGeneratorScript)GameObject.Find("MainMeshField").GetComponent("MeshFieldGeneratorScript"); GameObject[] tempCameraObjectArray = GameObject.FindGameObjectsWithTag("MainCamera"); for(int i = 0; i < tempCameraObjectArray.Length; i++) mainCameraComponentList.Add( (Camera)tempCameraObjectArray[i].GetComponent("Camera") ); //mainCameraComponent = (Camera)GameObject.Find("Main Camera").GetComponent("Camera"); for(int i = 0; i < tempCameraObjectArray.Length; i++) bloomScriptList.Add( (Bloom)tempCameraObjectArray[i].GetComponent("Bloom") ); GameObject[] meshLightsObjectsArray = GameObject.FindGameObjectsWithTag("MeshLight"); for(int i =0; i < meshLightsObjectsArray.Length; i++) { meshLightsList.Add( (Light)(meshLightsObjectsArray[i]).GetComponent("Light") ); } creatureManagerEmittedParts = (CreatureManagerEmittedParts)GameObject.FindWithTag("CreatureManager").GetComponent("CreatureManagerEmittedParts"); editor = (GeneralEditorScript)GameObject.FindWithTag("Editor").GetComponent("GeneralEditorScript"); Screen.showCursor = false; Screen.lockCursor = true; }
// Use this for initialization void Start() { meshFieldGeneratorScript = (MeshFieldGeneratorScript)GameObject.Find("MainMeshField").GetComponent("MeshFieldGeneratorScript"); GameObject[] tempCameraObjectArray = GameObject.FindGameObjectsWithTag("MainCamera"); for(int i = 0; i < tempCameraObjectArray.Length; i++) mainCameraComponentList.Add( (Camera)tempCameraObjectArray[i].GetComponent("Camera") ); //mainCameraComponent = (Camera)GameObject.Find("Main Camera").GetComponent("Camera"); for(int i = 0; i < tempCameraObjectArray.Length; i++) bloomScriptList.Add( (Bloom)tempCameraObjectArray[i].GetComponent("Bloom") ); GameObject[] meshLightsObjectsArray = GameObject.FindGameObjectsWithTag("MeshLight"); for(int i =0; i < meshLightsObjectsArray.Length; i++) { meshLightsList.Add( (Light)(meshLightsObjectsArray[i]).GetComponent("Light") ); } creatureManagerScript = (CreatureManagerScript)GameObject.Find("CreatureManager").GetComponent("CreatureManagerScript"); mainCameraGameObject = GameObject.FindWithTag("MainCamera"); //GameObject.Find("Main Camera"); if(isOVR) ovrCameraController = (OVRCameraController)GameObject.Find("OVRCameraController").GetComponent("OVRCameraController"); editor = (GeneralEditorScript)GameObject.Find("Editor_Importer").GetComponent("GeneralEditorScript"); Screen.showCursor = false; Screen.lockCursor = true; }