how can i set a parent to a entity i just created at the server system
CollectBox collectBox = state.EntityManager.GetComponentData<CollectBox>(raycastHit.Entity);
EntitiesReferences entitiesReferences = SystemAPI.GetSingleton<EntitiesReferences>();
Entity missileLauncher = entityCommandBuffer.Instantiate(collectBox.spawnEntity);
entityCommandBuffer.SetComponent(missileLauncher, LocalTransform.FromPosition(float3.zero));
entityCommandBuffer.SetComponent(missileLauncher, new CarObjectFollow { followEntity = entity });
entityCommandBuffer.AddComponent(missileLauncher, new Parent { Value = entity });
if (!state.EntityManager.HasBuffer<LinkedEntityGroup>(carObjectHolder.ValueRO.holdPointEntity))
{
entityCommandBuffer.AddBuffer<LinkedEntityGroup>(carObjectHolder.ValueRO.holdPointEntity);
}
entityCommandBuffer.AppendToBuffer(carObjectHolder.ValueRO.holdPointEntity, new LinkedEntityGroup
{
Value = missileLauncher
});
entityCommandBuffer.AddComponent(missileLauncher, new PredictedGhostSpawnRequest());
UnityEngine.Debug.Log(entity);
entityCommandBuffer.DestroyEntity(raycastHit.Entity);