x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Editor Plugin Development: How do I make a form with properties of an actor?

Could someone give me a basic example of how I can put a form with some information from an Actor to generate from the plugin, from there I can move on with the development.

I'm a few days into this. I'm having some difficulty in doing a simple thing in a plugin that I'm developing even scouring the documentation. Other than that I only find old documentation about it.

Preferably, I would like a more native way of doing this, without customizations.


This plugin was created using the "Editor Mode" template when using the "New Plugin" of UE4. I'm using it as the basis for this plugin I'm developing:

This plugin was created using the


And it's this kind of property that I want to put in my plugin, in this area of the editor, at first it would only have one String and one Enum to be selected:

And it's this kind of property that I want to put in my plugin, in this area of the editor, at first it would only have one String and one Enum to be selected.


Could someone help me with this, please?

Product Version: UE 4.18
Tags:
more ▼

asked Mar 20 '18 at 04:47 AM in C++ Programming

avatar image

LucasMartins
23 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

After much research, trial and error, I got what I wanted. I discovered that the secret to what I wanted is, briefly, in this setup:

ALSO, I've put an example plugin in the GitHub (I called it Empex - Editor Mode Plugin Example) to make it easier for someone who is looking for it: https://github.com/lucassena/Empex

  1. Create a DetailView in the FPropertyEditorModule with its DetailsViewArgs: (http://api.unrealengine.com/INT/API/...ateDetailView/)

      void SEmpexEditModeTools::Construct(const FArguments& InArgs)
         {
         // initialize settings view
         FDetailsViewArgs DetailsViewArgs;
         {
             // Some arguments here...
         }
     
         DetailsView = FModuleManager::GetModuleChecked<FPropertyEditorModule>("PropertyEditor").CreateDetailView(DetailsViewArgs);
     
         ChildSlot
         [
             SNew(SScrollBox)
             + SScrollBox::Slot()
             [
                 SNew(SVerticalBox)
                 + SVerticalBox::Slot()
                 .Padding(15, 12, 0, 12)
                 [
                     SNew(STextBlock)
                     .Text(LOCTEXT("Empex_Tip", "This is a simple text!"))
                 ]
                 + SVerticalBox::Slot()
                 .AutoHeight()
                 [
                     DetailsView.ToSharedRef() // And
                 ]
             ]
         ];
     }
     
     void SEmpexEditModeTools::SetDetailsObjects(const TArray<TWeakObjectPtr<>>& InObjects)
     {
         DetailsView->SetObjects(InObjects);
     }
    
    
  2. And declare some properties, obviously:

    UENUM() enum class EEmpexEnumDataExample : uint8 { Foo UMETA(DisplayName = "Foo"), Bar UMETA(DisplayName = "Bar"), Foobar UMETA(DisplayName = "Foobar"), };

    UCLASS() class UEmpexSettings : public UObject { GENERATED_UCLASS_BODY()

    public: // UObject interface virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override;

      ~UEmpexSettings();
     
         float GetFloatFoo() const { return FloatFoo; }
         void SetFloatFoo(float InRadius);
     protected:
         /** Example float property */
         UPROPERTY(EditAnywhere, Category = CategoryOne, meta = (DisplayName = "Float Foo"))
         float FloatFoo;
     public:
         /** Min and Max FloatFoo range retrieved from config */
         float FloatFooMin;
         float FloatFooMax;
     
         /** Example boolean property */
         UPROPERTY(EditAnywhere, Category = CategoryOne, meta = (DisplayName = "Boolean Bar"))
         bool bBooleanBar;
     
         /** Example enum property */
         UPROPERTY(EditAnywhere, Category = AnotherCategory)
         EEmpexEnumDataExample EnumDataExample;
     };
    
    
  3. There are a few more settings that are part of the structure of a plugin, but all of this you can see in the source code I'm making available on GitHub.

And the result you can see in the image:

alt text

Regards, Lucas Martins.

more ▼

answered Mar 25 '18 at 08:18 PM

avatar image

LucasMartins
23 5 7

avatar image Hyperion 5 Dec 25 '18 at 07:50 PM

Thanks my brudda. Time saver

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question