public Actor Spawn(Type type, object outer, SpawnParameters spawnArgs) { if (!typeof(Actor).IsAssignableFrom(type)) { throw new Exception("Can only spawn actors!"); } int classID = SerializableObject.StaticClassIDSlow(type); return(InternalSpawn(null, type, classID, outer, spawnArgs)); }
public Actor Spawn(ActorSpawnTag tag, object outer, SpawnParameters spawnArgs) { if (tag.type == null) { throw new Exception("ActorSpawnTag cannot load type: " + tag.typeName); } else { int classID = SerializableObject.StaticClassIDSlow(tag.type); return(InternalSpawn(tag, tag.type, classID, outer, spawnArgs)); } }
static SerializableObjectStaticClass() { _staticClassID = SerializableObject.StaticClassIDSlow(typeof(T)); }