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"

Missing data on actor component when playing (bug in duplicating?)

I created a custom actor component to put on my characters (both player and npcs). I put it on my player and on an npc of mine. Then, I set the properties in the blueprints.

The specific property I'm talking about is an array of a custom struct, where the struct contains 2 properties: (1) TSubclassOf MyType, and (2) a map from a custom enum to another custom struct.

On the player everything is working, but on the npc the data is missing; I've put a breakpoint in InitializeComponent(), and I can see the data is missing (it is there when I press compile on the editor, just not when starting the game). The weird thing is - the array items are actually there; but they are empty; it's as if the engine is having problem serializing and deserializing my custom properties.

As far as I know, objects that are placed in the world are duplicated, unlike my player which is spawned, and that is the only reason I can think why the npcs aren't working and the player is.

But I have no idea where or how to debug this to find the problem!

p.s. obviously, there is USTRUCT, UCLASS and UPROPERTY on any struct class and property

p.s.2 After writing this I had the idea to try and spawn an npc in blueprints, in runtime, to check my theory about duplicating. I did, and I was right; spawning the same npc in blueprints works.

Product Version: UE 4.21
more ▼

asked Dec 13 '18 at 01:11 PM in Bug Reports

avatar image

213 4 13 44

avatar image Jeff A ♦♦ STAFF Dec 13 '18 at 07:01 PM


We've recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.



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

0 answers: sort voted first
Be the first one to answer this question
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