#Im using `GetGame().SpawnEntityPrefab(
1 messages · Page 1 of 1 (latest)
the code runs on the server. Is there something in regards to that context that I need to do?
Here is my code:
Resource resource = Resource.Load(prefab);
BaseWorld baseWorld = GetGame().GetWorld();
EntitySpawnParams entitySpawnParams = new EntitySpawnParams();
entitySpawnParams.TransformMode = ETransformMode.WORLD;
GetWorldTransform(entitySpawnParams.Transform);
IEntity iEntity = GetGame().SpawnEntityPrefab(resource, baseWorld, entitySpawnParams);
iEntity.Update();