CLAssetEditor

所属分类:Unreal
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2023-08-29 15:00:00
上 传 者sh-1993
说明:  使用实用工具小部件构建基于选项卡的资产编辑器的虚拟引擎编辑器扩展。,
(Unreal Engine editor extension for building tab based asset editors using Utility Widgets.,)

文件列表:
CHANGELOG.md (750, 2023-09-24)
CLAssetEditor.uplugin (428, 2023-09-24)
CLAssetEditor.vcxproj (466, 2023-09-24)
Content/ (0, 2023-09-24)
Content/Sample/ (0, 2023-09-24)
Content/Sample/DataAssets/ (0, 2023-09-24)
Content/Sample/DataAssets/BP_PickupTest.uasset (120029, 2023-09-24)
Content/Sample/DataAssets/Item1_Test.uasset (2536, 2023-09-24)
Content/Sample/DataAssets/Item2_Test.uasset (2376, 2023-09-24)
Content/Sample/DataAssets/Item3_Test.uasset (2544, 2023-09-24)
Content/Sample/DataAssets/ItemTestDAValidator.uasset (67546, 2023-09-24)
Content/Sample/DataAssets/ItemTestDA_Base.uasset (20196, 2023-09-24)
Content/Sample/RunMe_Utility1.uasset (200747, 2023-09-24)
Content/Sample/RunMe_Utility2.uasset (62392, 2023-09-24)
Content/Sample/RunMe_Utility3.uasset (17840, 2023-09-24)
Content/Sample/TabContainer1.uasset (1423, 2023-09-24)
Content/Sample/TabContainer2.uasset (1340, 2023-09-24)
Content/Sample/Widgets/ (0, 2023-09-24)
Content/Sample/Widgets/ButtonTest_Item.uasset (120590, 2023-09-24)
Content/Sample/Widgets/EditorUtilityWidgetTest_ItemDetails.uasset (98505, 2023-09-24)
Content/Sample/Widgets/EditorUtilityWidgetTest_ItemDetails2.uasset (156013, 2023-09-24)
Content/Sample/Widgets/EditorUtilityWidgetTest_ItemViewport.uasset (172469, 2023-09-24)
Content/Sample/Widgets/EditorUtilityWidgetTest_Items.uasset (211494, 2023-09-24)
Content/Sample/Widgets/EditorUtilityWidgetTest_ViewportDetails.uasset (26701, 2023-09-24)
Content/Sample/Widgets/M_SimpleSkySphereTest.uasset (8521, 2023-09-24)
Content/Sample/Widgets/ViewportSimpleTest.uasset (5230, 2023-09-24)
LICENSE (1070, 2023-09-24)
Resources/ (0, 2023-09-24)
Resources/Icon128.png (12699, 2023-09-24)
Resources/PlaceholderButtonIcon.svg (312, 2023-09-24)
Resources/demo.gif (14040767, 2023-09-24)
Source/ (0, 2023-09-24)
Source/CLAssetEditor.Build.cs (1271, 2023-09-24)
Source/CLAssetEditorModule.cpp (2423, 2023-09-24)
Source/CLAssetEditorModule.h (3409, 2023-09-24)
Source/Factory/ (0, 2023-09-24)
Source/Factory/CLWidgetContainerAssetFactory.cpp (633, 2023-09-24)
Source/Factory/CLWidgetContainerAssetFactory.h (481, 2023-09-24)
... ...

The intended use case of this plugin is to build custom tab based asset editors using BP Editor Utility Widgets, as seen in: https://youtu.be/wJqOn88cU7o?feature=shared&t=1707 # How to use (Minimal Setup) 1) Create a new `CLWidgetContainerAsset` asset (Editor Utilities category). 2) Create a new `CLAssetEditorUtility` asset (Editor Utilities category). 3) Go to the `CLAssetEditorUtility` class defaults, and set the `CLWidgetContainerAsset` and the tab definitions (1 Editor Utility Widget per tab). 4) Override the `Run` event and call the `OpenEditor()` function. 5) Go back to your `CLAssetEditorUtility` asset in the Content Browser and run the script (Right Click->Run). 6) This will open an empty editor the first time. Go to the `Window` menu and manually add the tabs into your editor and save, so the layout is saved for next uses. 7) Now you can go back to the `CLAssetEditorUtility` and script the communication between the tabs, like in the example. (You can do this at any time, but note that the `GetUtilityWidget()` and the bindings won't work if the tabs are not present when the asset editor is opened). 8) Note that any change to the class default `TabDefinitions.TabId` parameter will reset the editor layout (Step 6 needs to be repeated if that's the case). 9) Optional. Call the `SaveDefaultLayout` method inside `CLAssetEditorUtility` once your tool is finished (disconnect the node afterwards). This will create a layout file in `Project/Config/Layouts` that can be shared through VCS so other people in the project can see a default layout when opening the custom editor for the first time. # Features - Exposes `CLAssetEditorUtility` which is a UEditorUtilityObject with the ability of building custom asset editors. - Exposes a custom Asset `CLWidgetContainerAsset` (`Editor Utilities` category) that can contain the custom editors (`CLAssetEditorUtility` need to reference this container in its class defaults). - The Editor Utility Widgets are created as usual and live each in a tab. This forces a decoupled approach (unintendedly), which is why `CLAssetEditorUtility` exists as it can be used to orchestrate the communication between the tabs. The plugin comes with a simple demo (Content folder): ![](https://raw.githubusercontent.com/cronofear-dev/CLAssetEditor/main/Resources/demo.gif) # Roadmap Things will be added as I need them in my project. For now, the following is planned: - Add more editor bindings as needed. - Add a button to the toolbar to save a default layout (calls `CLAssetEditorUtility.SaveDefaultLayout()`). Maybe add it to `File->Save`` so designers don't save layouts accidentally? - Override the `Browse to` button to browse the `CLAssetEditorUtility` instead Nice to have: - Find a way to add a `Browse to` functionality for each tab in the custom editor (Browse to the EditorUtilityWidget contained by the tab). - Investigate a way to add 1 or more BP widgets to the toolbar. - Support back and forth Asset/Json serialization (And use the JSON files as the single point of authority). I want to do this eventually but I'm not sure if it's worth the effort for now. - Maybe use `https://github.com/slowburn-dev/DataConfig` to support this? - Maybe save the json file along with the .uasset counterpart in the content folder (and open it using the asset editor or the OS explorer.) # Limitations and Known Issues - A custom asset editor can only contain unique instances of a given Editor Utility Widget type (If 2 copies of the same type are added, the plugin can only make bindings with the last instance of such type). This can be worked around by duplicating the Editor Utility Widget class and using the copy along with the original.

近期下载者

相关文件


收藏者