diff --git a/Source/TextAsset/TextAsset.Build.cs b/Source/TextAsset/TextAsset.Build.cs index b88c8c9..042e005 100644 --- a/Source/TextAsset/TextAsset.Build.cs +++ b/Source/TextAsset/TextAsset.Build.cs @@ -16,7 +16,7 @@ public TextAsset(ReadOnlyTargetRules Target) : base(Target) PrivateIncludePaths.AddRange( new string[] { - "Runtime/TextAsset/Private", + "TextAsset/Private" }); } } diff --git a/Source/TextAssetEditor/Private/AssetTools/TextAssetActions.h b/Source/TextAssetEditor/Private/AssetTools/TextAssetActions.h index 86f95dc..fc4fe84 100644 --- a/Source/TextAssetEditor/Private/AssetTools/TextAssetActions.h +++ b/Source/TextAssetEditor/Private/AssetTools/TextAssetActions.h @@ -12,10 +12,8 @@ class ISlateStyle; * Implements an action for UTextAsset assets. */ class FTextAssetActions - : public FAssetTypeActions_Base -{ + : public FAssetTypeActions_Base { public: - /** * Creates and initializes a new instance. * @@ -23,21 +21,58 @@ class FTextAssetActions */ FTextAssetActions(const TSharedRef& InStyle); -public: - //~ FAssetTypeActions_Base overrides virtual bool CanFilter() override; + + /** + * Get the actions for the passed in InObjects and display them within the MenuBuilder + * @param InObjects Reference to objects that have actions to display + * @param MenuBuilder Menu that will show the available actions + */ virtual void GetActions(const TArray& InObjects, FMenuBuilder& MenuBuilder) override; + + /** + * Where in the content browser content menu this asset will show up, using the EAssetTypeCategories enum + * @return Category that the asset belongs to + */ virtual uint32 GetCategories() override; + + /** + * Get the name of the asset, will be shown in the thumbnail within the editor + * @return FText for the name of the asset + */ virtual FText GetName() const override; + + /** + * Tells the editor which class the asset is.
+ * This must be implemented so the editor knows which class is to be used + * @return UClass that is supported + */ virtual UClass* GetSupportedClass() const override; + + /** + * Get the color to be used in the thumbnail for the asset + * @return FColor to be used + */ virtual FColor GetTypeColor() const override; + + /** + * Whether or not the passed in InObjects should display any context menu action + * @param InObjects Reference to objects that will be checked for actions + * @return If any of the InObjects have actions available + */ virtual bool HasActions(const TArray& InObjects) const override; + + /** + * Called whenever a user wishes to open an asset(or assets) for editing + * @param InObjects Assets that the user is trying to open + * @param EditWithinLevelEditor Pointer to the toolkit host, defaulted to exist. + * Checked within the function to determine which type of asset editor to open + */ virtual void OpenAssetEditor(const TArray& InObjects, TSharedPtr EditWithinLevelEditor = TSharedPtr()) override; private: - /** Pointer to the style set to use for toolkits. */ TSharedRef Style; }; diff --git a/Source/TextAssetEditor/Private/Styles/TextAssetEditorStyle.h b/Source/TextAssetEditor/Private/Styles/TextAssetEditorStyle.h index 0e0fd41..1c01dc7 100644 --- a/Source/TextAssetEditor/Private/Styles/TextAssetEditorStyle.h +++ b/Source/TextAssetEditor/Private/Styles/TextAssetEditorStyle.h @@ -2,7 +2,7 @@ #pragma once -#include "IPluginManager.h" +#include "Interfaces/IPluginManager.h" #include "Brushes/SlateImageBrush.h" #include "Styling/SlateStyle.h" #include "Styling/SlateStyleRegistry.h" diff --git a/TextAsset.uplugin b/TextAsset.uplugin index ea96d56..27df85c 100644 --- a/TextAsset.uplugin +++ b/TextAsset.uplugin @@ -1,8 +1,8 @@ { "FileVersion" : 3, "Version" : 8, - "VersionName" : "8.0", - "EngineVersion" : "4.19.0", + "VersionName" : "8.1", + "EngineVersion" : "4.27", "FriendlyName" : "Text Asset", "Description" : "Adds an editable text content asset for personal notes.", "Category" : "Editor", @@ -27,6 +27,5 @@ "Type" : "Editor", "LoadingPhase" : "Default" } - ] }