Summary
Adding one entity to another causes it to disappear
Please select what you are reporting on:
Creative
What Type of Bug are you experiencing?
Assets
Steps to Reproduce
Add functionality that adds one entity into another
My implementation:
- add “entity_thats_being_added_into” to entity with mesh_component
- add “entity_thats_being_added” to entity with mesh_component
using { /Verse.org }
using { /Verse.org/Native }
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
using { /Verse.org/SpatialMath }
entity_thats_being_added_into<public> := class<final_super>(component){}
entity_thats_being_added<public> := class<final_super>(component):
OnBeginSimulation<override>():void=
(super:)OnBeginSimulation()
spawn{AddItselfToAnotherEntity()}
AddItselfToAnotherEntity()<suspends>:void=
Sleep(10.0)
if:
SimulationEntity := Entity.GetSimulationEntity[]
then:
for (AddIntoEntity : SimulationEntity.FindDescendantEntitiesWithComponent(entity_thats_being_added_into)):
AddIntoEntity.AddEntities(array{Entity})
Print("Added Into")
return
Expected Result
Entity “entity_thats_being_added” will have changed parent to “entity_thats_being_added_into” and will be visible as before
Observed Result
Entity “entity_thats_being_added” changed parent to “entity_thats_being_added_into” but became invisible
Platform(s)
PC