public GameObject CreateORKCombatants(string combatant_GUID, string faction_GUID, Vector3 position, Vector3 rotation, GameObject prefab)
{
FactionSetting _faction = ORK.Factions.Get(faction_GUID);
CombatantSetting _settings = ORK.Combatants.Get(combatant_GUID);
Combatant _combatant;
_combatant = ORK.Access.Combatant.CreateInstance(_settings, new Group(_faction), false, false);
_combatant.GameObject = Instantiate(prefab, position, Quaternion.Euler(rotation.x, rotation.y, rotation.z));
return _combatant.Object.GameObject;
}
It looks like you're new here. If you want to get involved, click one of these buttons!
You don't spawn the combatant, you set a game object for it :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
combatant.Setting.schematicSettings.SpawnSchematics.StartSchematic(combatant, null);
combatant naturally being the combatant instance :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!