public void OnEnable(){ AGF_IntegrationManager integrationManager = (AGF_IntegrationManager)target; GameObject obj = integrationManager.gameObject; m_IntegrationManager = integrationManager; //GameObject.Find ("AGF_Integration").GetComponent<AGF_IntegrationManager>(); List<Transform> cameraComponents = new List<Transform>(); Main.GetTransformsWithComponentRecursively( obj.transform, "AGF_CameraManager", ref cameraComponents ); if ( cameraComponents.Count == 1 ){ m_CameraManager = cameraComponents[0].GetComponent<AGF_CameraManager>(); } }
public SkyboxProperties() : base() { // store references m_TerrainManager = GameObject.Find ("AGF_TerrainManager").GetComponent<AGF_TerrainManager>(); m_SaveDataManager = GameObject.Find ("AGF_LevelLoader").GetComponent<AGF_LevelLoader>(); m_CameraManager = GameObject.Find ("AGF_CameraManager").GetComponent<AGF_CameraManager>(); }
public KeyLightProperties( Transform newTransform ) : base(newTransform) { m_TerrainManager = GameObject.Find ("AGF_TerrainManager").GetComponent<AGF_TerrainManager>(); m_CameraManager = GameObject.Find("AGF_CameraManager").GetComponent<AGF_CameraManager>(); }