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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

TMap in Details Panel

Hi again,

When we have a TArray as a UPROPERTY inside a USTRUCT, it renders in details panel automatically with our data, like so :

alt text

but when I use a TMap with FName as key and a USTRUCT with just a boolean as value, it doesn't looks right in the details panel....

The code for better understanding:

 USTRUCT()
 struct FMyValueStruct
 {
     GENERATED_USTRUCT_BODY()
  
     UPROPERTY(EditAnywhere, Category = Setup)
     bool MyBool;
 };
 
 USTRUCT()
 struct FMyTMapStruct
 {
     GENERATED_USTRUCT_BODY()
 
         UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay)
         TMap<FName, FMyValueStruct> DisplayTMap;
 };


I'm adding bone names as key in my source file....

In Editor, DetailsPanel it display the field like:

DisplayTMap | ((Bone1, )), ((Bone2, )), ((Bone3, )), ((Bone4))

Not as a TArray does, like in the above example:

Am I doing something wrong or TMap doesn't have a default display to details panel?

Also, the core idea behind it is that I want to display the name of a bone in left side of the details panel, not the array index number, like TArray does, So, for this reason, I'm trying to use TMap.

Product Version: UE 4.11
Tags:
more ▼

asked May 18 '16 at 02:06 PM in C++ Programming

avatar image

edsonsantoro
30 10 13 11

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

1 answer: sort voted first

Yeah, TMap is not supported in the details panel yet. It simply displays a text box with the string representation of the value.

more ▼

answered May 18 '16 at 02:21 PM

avatar image edsonsantoro May 18 '16 at 02:54 PM

Thank you !

avatar image Douglas Lassance Oct 27 '16 at 09:22 AM

This documentation page seems to indicate that TMaps should display as expected when using the UPROPERTY macro. I tried this on both a BluePrint and a DataAsset with little success. Any idea why?

avatar image edsonsantoro Oct 31 '16 at 11:25 AM

When I was dealing with it UE doesn't gave support for TMaps even using Uproperty Macro. After 4.13 or 4.14 it was included! Thanks at all.

(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