private void OnEnable() { //if (!ReflectionsMod.ImageEffectHelper.IsSupported(shader, false, true, this)) //{ // enabled = false; // return; //} camera_.depthTextureMode |= DepthTextureMode.Depth; kFinalReflectionTexture = Shader.PropertyToID("_FinalReflectionTexture"); kTempTexture = Shader.PropertyToID("_TempTexture"); GameObject goReflectionsMod = GameObject.Find("ReflectionsMod"); componentUpdateReflectionTextures = goReflectionsMod.GetComponent <UpdateReflectionTextures>(); goCreateReflectionLookupTextures = new GameObject("CreateReflectionLookupTextures"); goCreateReflectionLookupTextures.transform.SetParent(goReflectionsMod.transform); componentCreateReflectionLookupTextures = goCreateReflectionLookupTextures.AddComponent <CreateReflectionLookupTextures>(); }
void Start() { dfUnity = DaggerfallUnity.Instance; reflectionTexturesScript = GameObject.Find("ReflectionsMod").GetComponent <UpdateReflectionTextures>(); if (!streamingWorld) { streamingWorld = GameObject.Find("StreamingWorld").GetComponent <StreamingWorld>(); } if (!streamingWorld) { DaggerfallUnity.LogMessage("InjectReflectiveMaterialProperty: Missing StreamingWorld reference.", true); if (Application.isEditor) { Debug.Break(); } else { Application.Quit(); } } gameObjectReflectionPlaneGroundLevel = GameObject.Find("ReflectionPlaneBottom"); gameObjectReflectionPlaneSeaLevel = GameObject.Find("ReflectionPlaneSeaLevel"); gameObjectReflectionPlaneLowerLevel = gameObjectReflectionPlaneSeaLevel; // get inactive gameobject StreamingTarget (just GameObject.Find() would fail to find inactive gameobjects) GameObject[] gameObjects = Resources.FindObjectsOfTypeAll <GameObject>(); foreach (GameObject currentGameObject in gameObjects) { string objectPathInHierarchy = GetGameObjectPath(currentGameObject); if (objectPathInHierarchy == "/Exterior/StreamingTarget") { gameObjectStreamingTarget = currentGameObject; } } iniData = getIniParserConfigInjectionTextures(); }
void Start() { instanceUpdateReflectionTextures = GameObject.Find("ReflectionsMod").GetComponent<UpdateReflectionTextures>(); }
void Start() { instanceUpdateReflectionTextures = GameObject.Find("ReflectionsMod").GetComponent <UpdateReflectionTextures>(); }
void Start() { dfUnity = DaggerfallUnity.Instance; reflectionTexturesScript = GameObject.Find("ReflectionsMod").GetComponent<UpdateReflectionTextures>(); if (!streamingWorld) streamingWorld = GameObject.Find("StreamingWorld").GetComponent<StreamingWorld>(); if (!streamingWorld) { DaggerfallUnity.LogMessage("InjectReflectiveMaterialProperty: Missing StreamingWorld reference.", true); if (Application.isEditor) Debug.Break(); else Application.Quit(); } gameObjectReflectionPlaneGroundLevel = GameObject.Find("ReflectionPlaneBottom"); gameObjectReflectionPlaneSeaLevel = GameObject.Find("ReflectionPlaneSeaLevel"); gameObjectReflectionPlaneLowerLevel = gameObjectReflectionPlaneSeaLevel; // get inactive gameobject StreamingTarget (just GameObject.Find() would fail to find inactive gameobjects) GameObject[] gameObjects = Resources.FindObjectsOfTypeAll<GameObject>(); foreach (GameObject currentGameObject in gameObjects) { string objectPathInHierarchy = GetGameObjectPath(currentGameObject); if (objectPathInHierarchy == "/Exterior/StreamingTarget") { gameObjectStreamingTarget = currentGameObject; } } iniData = getIniParserConfigInjectionTextures(); }