void OnEnable() { // Find all the relevant properties from the GUI isDarkTheme = serializedObject.FindProperty("isDarkTheme"); accentColor = serializedObject.FindProperty("accentColor"); hoverColor = serializedObject.FindProperty("hoverColor"); pressedColor = serializedObject.FindProperty("pressedColor"); disabledColor = serializedObject.FindProperty("disabledColor"); // Add all the necessary tags TagsAndLayers.AddTag("VRUIBackground"); TagsAndLayers.AddTag("VRUIText"); TagsAndLayers.AddTag("VRUIIcon"); TagsAndLayers.AddTag("VRUIOutline"); TagsAndLayers.AddTag("VRUIButton"); TagsAndLayers.AddTag("VRUIButtonTab"); TagsAndLayers.AddTag("VRUIButtonControlBar"); TagsAndLayers.AddTag("VRUIButtonList"); TagsAndLayers.AddTag("VRUICheckbox"); TagsAndLayers.AddTag("VRUIToggle"); TagsAndLayers.AddTag("VRUIRadio"); TagsAndLayers.AddTag("VRUISlider"); TagsAndLayers.AddTag("VRUIButtonIcon"); TagsAndLayers.AddTag("VRUIAccent"); }
public void CreateUnityEditorTags() { foreach (CustomTag cTag in targetObject.TagList) { TagsAndLayers.AddTag(cTag.Value); } }