Пример #1
0
 /// <summary>
 /// Create a new <see cref="SkillSet"/> at a given path.
 /// </summary>
 /// <param name="assetPath">Path where the <see cref="SkillSet"/> will be saved</param>
 public override void CreateNewAsset(string assetPath)
 {
     base.CreateDirectories(assetPath);
     asset = EditorTools.Create <SkillSet>(assetPath);
     if (asset)
     {
         string relPath = AssetDatabase.GetAssetPath(asset);
         EditorPrefs.SetString("AssetPath" + assetName, relPath);
     }
 }
Пример #2
0
        void OnEnable()
        {
            manager = target as GlassRenderOrderManager;

            if (tools == null)
            {
                tools = EditorTools.Create(manager, this);
            }

            manager.RefreshGlassTypes();

            list = new ReorderableList(manager.glassTypes, typeof(GlassType), true, false, false, false);
            list.drawHeaderCallback  = HeaderCallBackDelegate;
            list.drawElementCallback = ElementCallBackDelegate;
            list.onReorderCallback   = ReorderCallBackDelegate;
            list.onChangedCallback   = ChangedCallBackDelegate;
            list.onSelectCallback    = SelectCallBackDelegate;
        }
Пример #3
0
    public ToolsButton()
    {
        Game game = Game.Get();

        if (!game.editMode)
        {
            return;
        }

        TextButton tb = new TextButton(new Vector2(UIScaler.GetRight(-6), 0), new Vector2(6, 1), new StringKey("val", "COMPONENTS"), delegate { QuestEditorData.TypeSelect(); });

        tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont();
        tb.ApplyTag(Game.QUESTUI);

        tb = new TextButton(new Vector2(UIScaler.GetRight(-10), 0), new Vector2(4, 1), TOOLS, delegate { EditorTools.Create(); });
        tb.button.GetComponent <UnityEngine.UI.Text>().fontSize = UIScaler.GetSmallFont();
        tb.ApplyTag(Game.QUESTUI);
    }