/// <summary> /// Find the theme is none was manually set /// </summary> private void Start() { if (mTextureTheme == null) { mTextureTheme = GetTextureTheme(ThemeTag); SetTexture(State); } }
/// <summary> /// Find a TextureInteractiveTheme by tag /// </summary> /// <param name="tag"></param> /// <returns></returns> public TextureInteractiveTheme GetTextureTheme(string tag) { // search locally TextureInteractiveTheme[] textureThemes = InteractiveHost.GetComponentsInChildren <TextureInteractiveTheme>(); TextureInteractiveTheme theme = FindTextureTheme(textureThemes, tag); // search globally if (theme == null) { textureThemes = FindObjectsOfType <TextureInteractiveTheme>(); theme = FindTextureTheme(textureThemes, tag); } return(theme); }
public override void SetTheme() { mTextureTheme = GetTextureTheme(ThemeTag); mCheckThemeTag = ThemeTag; }