Improbable Icon

SpatialOS Forums

How to make multiple character choose?

I got 2 character, mean 2 prefabs.
name: Player, Player2

about linker like this
IEntityGameObjectCreator -> OnEntityCreated
var pathToPrefab = $“Prefabs/UnityClient/Authoritative/Player”;
var prefab = Resources.Load(pathToPrefab);
var playerGameObject = Object.Instantiate(prefab);
linker.LinkGameObjectToSpatialOSEntity(entity.SpatialOSEntityId, (GameObject)playerGameObject);

But when CreatePlayerEntityTemplate running,
it always only
template.AddComponent(new Metadata.Snapshot(entityType:“Player”), clientAttribute);

Hi @BuildOnBarren,

Would you be able to share a bit more information on what you’re trying to do exactly with the characters/prefabs?

I’m not 100% clear on what you’re looking to achieve and if you could share any screenshots you have of the error you’re seeing, we can perhaps have a better idea of where you’re stuck at and can guide you better.

Many thanks,