Empty Update() methods waste performance
-
This is a minor gripe and easy to fix for you.
Your code does this:
void Update ()
{
#if UNITY_EDITOR
if (Application.isPlaying!=true)
{
SCShader = Shader.Find("CameraFilterPack/Glasses_OnX");
Texture2 = Resources.Load ("CameraFilterPack_Glasses_On3") as Texture2D;
}
#endif
}Replace it with this:
#if UNITY_EDITOR
void Update ()
{
if (Application.isPlaying!=true)
{
SCShader = Shader.Find("CameraFilterPack/Glasses_OnX");
Texture2 = Resources.Load ("CameraFilterPack_Glasses_On3") as Texture2D;
}
}
#endifBest regards,
Rando Wiltschek