public static void ResetAgentTypeIds() { s_agentTypeMap = new Dictionary <string, int>(); int count = NavMesh.GetSettingsCount(); for (int i = 0; i < count; ++i) { int id = NavMesh.GetSettingsByIndex(i).agentTypeID; string name = NavMesh.GetSettingsNameFromID(id); s_agentTypeMap.Add(name, id); } }
public static string[] GetAgentTypeNames() { int count = NavMesh.GetSettingsCount(); var agentTypeNames = new string[count + 2]; for (int i = 0; i < count; ++i) { int id = NavMesh.GetSettingsByIndex(i).agentTypeID; string name = NavMesh.GetSettingsNameFromID(id); agentTypeNames[i] = name; } return(agentTypeNames); }