コード例 #1
0
    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");
    }
コード例 #2
0
 public void CreateUnityEditorTags()
 {
     foreach (CustomTag cTag in targetObject.TagList)
     {
         TagsAndLayers.AddTag(cTag.Value);
     }
 }