public void SpawnPassenger(Vector3 spawnPos) { Quaternion identity = Quaternion.identity; HumanNPCNew component = GameManager.server.CreateEntity(dismountablePrefab.resourcePath, spawnPos, identity).GetComponent <HumanNPCNew>(); component.Spawn(); AttemptMount(component); }
public void SpawnPassenger(Vector3 spawnPos, string prefabPath) { Quaternion identity = Quaternion.identity; HumanNPCNew component = GameManager.server.CreateEntity(prefabPath, spawnPos, identity).GetComponent <HumanNPCNew>(); component.Spawn(); AttemptMount(component); }