/// <summary> /// Find a Vector3InteractiveTheme by tag /// </summary> /// <param name="tag"></param> /// <returns></returns> public Vector3InteractiveTheme GetVector3Theme(string tag) { // search locally Vector3InteractiveTheme[] vector3Themes = InteractiveHost.GetComponentsInChildren <Vector3InteractiveTheme>(); Vector3InteractiveTheme theme = FindVector3Theme(vector3Themes, tag); // search globally if (theme == null) { vector3Themes = FindObjectsOfType <Vector3InteractiveTheme>(); theme = FindVector3Theme(vector3Themes, tag); } return(theme); }
/// <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); }
/// <summary> /// Find a ColorInteractiveTheme by tag /// </summary> /// <param name="tag"></param> /// <returns></returns> public ColorInteractiveTheme GetColorTheme(string tag) { // search locally ColorInteractiveTheme[] colorThemes = InteractiveHost.GetComponentsInChildren <ColorInteractiveTheme>(); ColorInteractiveTheme theme = FindColorTheme(colorThemes, tag); // search globally if (theme == null) { colorThemes = FindObjectsOfType <ColorInteractiveTheme>(); theme = FindColorTheme(colorThemes, tag); } return(theme); }