UObject data not getting saved

I have a situation where a UObject based asset is having its array size manipulated, but the data within is all defaults rather than what’s being set. It’s based on a plugin in it’s early stages so here’s a link to that.

To reproduce, do the following:

  1. Create a new project (C++).
  2. Create a Plugins folder inside that project and extract the linked .
  3. Restart Unreal to load the plugin.
  4. Open the project, and create an asset under miscellaneous called “World Streaming Data”.
  5. Create any static mesh actor in the level, and add the actor tag “Streaming”.
  6. Add an actor called “World Streaming Actor”, set the Data property to the object created in step 3.
  7. Down the bottom where the blutilities are, choose the one called “Record” and run it.
  8. Note that the object created in step 3 now contains 1 item under “Instances”, however the properties are all defaults.

The properties should have been set at line 51-58 in WorldStreamingData.cpp, but they’re being saved with default values!

Hello ,

Thank you for reporting this issue. When trying to reproduce this issue, I was able to follow everything correctly except for step 6. I’m not familiar with using this experimental feature so I’m not sure if I’m doing this correctly but I added the World Streaming Actor to the level so that I could select the Record blutility and hit Run. This didn’t result in anything at all. The WorldStreamingData asset still says it has 0 elements. Could there be something that I’m doing wrong? As far as this not working correctly, do you get different results in you run the Record function off Event Begin Play instead? This could be a bug that results from using Blutilities, as it’s still experimental at this time.

I’ve gone over my steps and succesfully recreated the case, although i’ve clarified in my original post in italic. The tagged actor must be a static mesh. Hopefully this works for you!

Thank you for that clarification but it doesn’t seem correct to me. I was able to reproduce this by following the original steps again somehow. When trying to follow your newly edited steps, Step 6 creates a contradiction. If I create a StaticMeshActor instead of a WorldStreamingActor at that stage, the Data property doesn’t exist, even if it’s named WorldStreamingActor as prompted.

When reproducing this, I may be seeing different results however. When I ran the record blutility, the instance added to the NewWorldStreamingData object (created in step 4) had its Transform populated and matched up to the actor created in step 5. The asset reference is still blank however and I’m not quite sure why. I’m not familiar with using FStringAssetReference at the moment but it could be that it’s expecting a different type of path than what is returned by GetFullName. One thing that is a bit peculiar is that the dropdown for Asset Reference seems to be wanting a reference to things in the Content Browser rather than instances in the level.

My apologies, I meant to put the static mesh note in Step 5. It’s interesting that you got it to save the proper transform though.

I’m actually not able to get the Record blutility to do anything when using a Static Mesh actor as the actor that has the Streaming tag, whether I’m dragging a Static Mesh asset directly into the level or making a blueprint based off the “Static Mesh Actor” class. It doesn’t seem to record any data at all. Creating a blueprint based off of “Actor” and placing that in the level with the Streaming tag does results in what I mentioned in my previous comment.

Could you try looking into why the Asset Reference field is looking for classes rather than instances, or is that what you intend for it to be storing?

We haven’t heard from you in a while, . Are you still experiencing this issue? If so, have you tried looking into what I mentioned? In the meantime, I’ll be marking this issue as resolved for tracking purposes.

Hi Matt,

I looked into this again and have confirmed the following:

  1. Saving transforms does work.
  2. Saving FStringAssetReference does not. Saving FString instead works.

Hello ,

After looking into this again, it seems that changing the function to use GetPathName() to get the path from StreamingActorKeys instead of using GetFullName() results in this working correctly. You may need to restart the editor and do a full rebuild before it works but it’s working on my end now.

Oh excellent, thanks a lot for that Matthew!