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"

How to add new templates to UE4 reflection system?

In 4.13 release we can see added new TSet type to reflection (property) system.

So, can I create own template classes which can be used as UPROPERTies?

Now there next template types which used in reflection system: TArray, TMap, TSet, TSubclassOf. If I want create my own what I must do?

Need I change UBT\UHT for this and Core modules?

Thanks!

Product Version: UE 4.13
Tags:
more ▼

asked Sep 16 '16 at 09:10 PM in C++ Programming

avatar image

broly
529 40 61 88

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You would need to create UProperty class (look up engine source code to see how they are implmented) which represets the property type:

https://github.com/EpicGames/UnrealEngine/tree/55c9f3ba0010e2e483d49a4cd378f36a46601fad/Engine/Source/Runtime/CoreUObject/Private/UObject

also you need to modify UHT to make it recognize it

https://github.com/EpicGames/UnrealEngine/blob/e528f9f7fa161504dd629c3b390deac93650e43a/Engine/Source/Programs/UnrealHeaderTool/Private/UHTMakefile/UHTMakefile.cpp

and ofcorse Slate UI if you want to make it apper in property editor and you need to do the same with node pins:

https://github.com/EpicGames/UnrealEngine/tree/55c9f3ba0010e2e483d49a4cd378f36a46601fad/Engine/Source/Editor/PropertyEditor/Private/UserInterface/PropertyEditor

I never even think about doing that so this is all i can give you, it might need even deeper modifications in core so it might be painful. Note that you can create custom property UI for any type that reflection system supports for example custom UI specific structure type (good example here is FSlateBrush), so if you aim for that you don't need to create custom property type for just that

more ▼

answered Nov 17 '16 at 12:10 AM

avatar image

Shadowriver
34.7k 918 166 1095

(comments are locked)
10|2000 characters needed characters left
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