void Awake() { if (_instance) { throw new System.Exception("Singleton Exception."); } _instance = this; id_fogHorColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_FOG_HORIZON); id_fogApexColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_FOG_APEX); id_skyHorColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_SKY_HORIZON); id_skyApexColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_SKY_APEX); id_params = Shader.PropertyToID(ShaderLib.Variables.VECTOR_FOG_PARAMS); #if !UNITY_EDITOR ValidateSkybox(); #endif }
void Awake() { if (_instance) { throw new System.Exception("Singleton Exception."); } _instance = this; id_fogHorColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_FOG_HORIZON); id_fogApexColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_FOG_APEX); id_skyHorColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_SKY_HORIZON); id_skyApexColor = Shader.PropertyToID(ShaderLib.Variables.VECTOR_SKY_APEX); id_params = Shader.PropertyToID(ShaderLib.Variables.VECTOR_FOG_PARAMS); #if !UNITY_EDITOR ValidateSkybox(); #endif }