Megafunk / MassSample

My understanding of Unreal Engine 5's experimental ECS plugin with a small sample project.
MIT License
753 stars 119 forks source link

Smart Objects not Registering Properly [Bug Fix] #33

Open Ji-Rath opened 2 years ago

Ji-Rath commented 2 years ago

I've run into an issue with editor-spawned smart objects where they are not properly registered. This means I need to register them again, making them runtime smart objects.

I believe this is because the smart objects attempt to register before the Main Collection is setup as can be seen below in the logs.

LogSmartObject: VeryVerbose: BP_SmartObject_C_UAID_0A002700000CC91301_1585782600 not added to collection since Main Collection is not set.
LogSmartObject: VeryVerbose: BP_SmartObject_C_UAID_0A002700000CC91301_1585789603 not added to collection since Main Collection is not set.
LogSmartObject: Main collection 'SmartObjectCollection_0' registered with 0 entries

A suggestion would be to simply register the Main Collection earlier or register the smart objects after the Collection is setup. As an alternative, I am simply re-registering the smart objects again on BeginPlay() as a temporary solution.

Unfortunately, I have not downloaded the city sample yet which I believe contains examples of smart objects. It is completely possible I just missed something simple.

vorixo commented 2 years ago

We'll see what we can do with this issue. I suggest taking a look yourself in the code as smart objects fall a bit on the boundaries