void OnTriggerExit(Collider other) { if (!cameraInside || targetFog == null) { return; } if (other == targetCollider || other.gameObject.transform.GetComponentInChildren <Camera>() == targetFog.fogCamera) { cameraInside = false; if (enableProfileTransition && targetProfile != null) { targetFog.ClearTargetProfile(transitionDuration); } if (enableAlphaTransition) { targetFog.ClearTargetAlpha(transitionDuration); } if (enableFogColorTransition) { targetFog.ClearTargetColor(transitionDuration); } if (enableFogSpecularColorTransition) { targetFog.ClearTargetSpecularColor(transitionDuration); } if (enableLightColorTransition) { targetFog.ClearTargetLightColor(transitionDuration); } if (debugMode) { Debug.Log("Fog Volume exited by " + other.name); } } }
void OnTriggerExit(Collider other) { if (!cameraInside) { return; } if (other == targetCollider || other.gameObject.transform.GetComponentInChildren <Camera> () == fog.fogCamera) { cameraInside = false; if (enableAlphaTransition) { fog.ClearTargetAlpha(transitionDuration); } if (enableFogColorTransition) { fog.ClearTargetColor(transitionDuration); } if (enableFogSpecularColorTransition) { fog.ClearTargetSpecularColor(transitionDuration); } if (enableLightColorTransition) { fog.ClearTargetLightColor(transitionDuration); } } }