public void initID(string[] string_id) { ComponentsEnums.Components[] ids = new ComponentsEnums.Components[string_id.Length]; for (int i = 0; i < string_id.Length; i++) { ids[i] = ComponentsEnums.GetEnumFromString(string_id[i]); } setID(ids); }
//Sets the parameter value to the object having "objName" as name. public void SetSimulationParameter(string objName, string[] param) { ComponentsEnums.Components[] enums = new ComponentsEnums.Components[param.Length]; for (int i = 0; i < param.Length; i++) { enums[i] = ComponentsEnums.GetEnumFromString(param[i]); } GameObject.FindWithTag("Cockpit").transform.Find(objName).GetComponent <NewParameterManager>().setID(enums); }