#Im using `GetGame().SpawnEntityPrefab(

1 messages · Page 1 of 1 (latest)

nocturne knot
#

be aware that on dedicated server it wouldn't work as it is in SP!

glad parrot
# nocturne knot be aware that on dedicated server it wouldn't work as it is in SP!

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();