Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     Sprites = GameObject.FindObjectsOfType <SpriteRenderer>();
     foreach (SpriteRenderer Sp in Sprites)
     {
         SpriteLight Has;
         Sp.TryGetComponent <SpriteLight>(out Has);
         if (Has == null && Sp.gameObject.tag != "Hud")
         {
             Sp.gameObject.AddComponent <SpriteLight>();
         }
     }
 }