diff --git a/CHANGELOG.md b/CHANGELOG.md index 37efedb..ac10751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,15 @@ # Change Log +#### v1.8.6 - Jan 30, 2024 + +- added Sample: Asset Workflow with GUI. Allows selecting between CodeSmile and Unity API. Unity API code is 33% more lines/characters, with folder creation hardcoded. + #### v1.8.5 - Jan 29, 2024 - added Asset.File.FindPaths overload accepting Path[] - added Asset.Label.GetAll overload accepting Path - added Asset.Label.Remove and Asset().RemoveLabel +- fixed invalid cast exception (Asset.Path[] to string[]) - removed add sub-asset check for ".asset" extension. Turns out you can also add subassets to a .mesh extension asset and there may be others. #### v1.8.4 - Jan 24, 2024 diff --git a/Samples~/AssetWorkflowWithGUI/CodeSmileAssetDatabaseDemoWindow.cs b/Samples~/AssetWorkflowWithGUI/AssetDemoWindow.CodeSmileAPI.cs similarity index 56% rename from Samples~/AssetWorkflowWithGUI/CodeSmileAssetDatabaseDemoWindow.cs rename to Samples~/AssetWorkflowWithGUI/AssetDemoWindow.CodeSmileAPI.cs index 548e427..61a62db 100644 --- a/Samples~/AssetWorkflowWithGUI/CodeSmileAssetDatabaseDemoWindow.cs +++ b/Samples~/AssetWorkflowWithGUI/AssetDemoWindow.CodeSmileAPI.cs @@ -1,69 +1,20 @@ -// Copyright (C) 2021-2024 Steffen Itterheim +// Copyright (C) 2021-2024 Steffen Itterheim // Refer to included LICENSE file for terms and conditions. using CodeSmile_AssetDatabase_Demo; using CodeSmileEditor; -using System; using System.Collections.Generic; -using UnityEditor; using UnityEngine; -using UnityEngine.UIElements; -public class CodeSmileAssetDatabaseDemoWindow : EditorWindow +public partial class AssetDemoWindow { - private static readonly Asset.Path DemoAssetsPath = "Assets/CodeSmile AssetDatabase Demo Assets/Sample Assets"; - - [SerializeField] private VisualTreeAsset m_VisualTreeAsset; - - [MenuItem("Window/CodeSmile/AssetDatabase Examples/Workflow Demo", priority = 2999)] - public static void ShowAssetDatabaseDemoWindow() - { - var wnd = GetWindow(); - wnd.titleContent = new GUIContent("CodeSmile AssetDatabase Demo"); - } - - public void CreateGUI() - { - var uiBuilderDocument = m_VisualTreeAsset.Instantiate(); - rootVisualElement.Add(uiBuilderDocument); - - RegisterCallbacks(true); - } - - private void OnDestroy() => RegisterCallbacks(false); - - private void RegisterCallbacks(Boolean register) - { - var createButton = rootVisualElement.Q