public static GameObject FindLogo(CustomTypes.logo l) { switch (l) { case CustomTypes.logo.bat: return(GameObject.Find("Logo/BatLogo")); case CustomTypes.logo.a: return(GameObject.Find("Logo/EFlickering/LogoE")); case CustomTypes.logo.saber: return(GameObject.Find("Logo/SaberLogo")); } if (l == null) { return(null); } else { return(null); } }
public static Texture2D GetTexture(CustomTypes.logo logoType) { Plugin.Log.Info("Finding Logo"); return((Texture2D)FindLogo(logoType).GetComponentInChildren <SpriteRenderer>().sprite.texture); }
public static void ReplaceTexture(CustomTypes.logo logoType, Texture2D texture) { FindLogo(logoType).GetComponent <SpriteRenderer>().material.SetTexture("_MainTex", texture); }