MapEditor
                                
                                 MapEditor copied to clipboard
                                
                                    MapEditor copied to clipboard
                            
                            
                            
                        [BUG] Spawning some prefabs/nongroupable results in a client crash.
Some examples:
Map and mode: XP3_shield Teamdeathmatch0
need to investigate more. current result showed that it didn't spawn that many entities. was like 1 breakableentity and 2 floatentities. And the creation itself wasn't crashing. At least i got prints after the entity:init stuff. So I will try to create a mod where I just spawn that housevilla prefab and try to analyse the differences between the ones that get spawned anyways and the custom one. Like number of entities, network, realm etc. If that doesn't work I will try to block some entities of the custom one.
Spawning just on the server works. spawning server and client doesn’t. Didn’t try only spawning on the client but I guess its the same result.
Instead of doing: https://github.com/BF3RM/MapEditor/blob/640b1f2d89f3b97426066094bcfb3196b9a98afa/ext/Shared/Modules/GameObjectManager.lua#L200-L209
We should consider doing:
-- Custom object have to be manually initialized.
if not s_GameObject.origin == GameObjectOriginType.Vanilla then
	self.m_InitEntities = true
end
local s_EntityBus = p_Hook:Call()
---vvvv This is children to parent / bottom to top vvvv
and then init the entities in EntityFactory:Create. That way we won't miss any entity. Cuz rn it just inits some FloatEntities but not the SoundArea, MixerEntities, MathOpEntity etc. That's untested btw. and won't fix the issue but it's still related to the whole thing.
And the issue with this crash is not because of the entities of the prefab. It has to do with the ReferenceObjectData which calls the Breakable blueprint. Weird because spawning just that worked always. So it has to be that the breakable blueprint has a parentRepresentative thats pointing to the prefab ReferenceObjectData. Exchanging that with a custom one, stopped the crash until I init the entities of that entitybus. We have to go a step back. Because spawning the Breakable blueprint withs in MapEditor. But doing that in another mod made it crash for me. So I wonder why it is working in MapEditor. Are there any changes made? And if so, could we fix it by applying these changes to the reference blueprint as well?