public static void CopyParameterList(EditorProp orig, EditorProp toCopy) { orig.Clear(); int l = toCopy.arraySize; for (int p = 0; p < l; p++) { CopyParameter(orig.AddNew(), toCopy[p]); //Debug.Log("copying :" + toCopy[p][nameField].stringValue); } }
//returns true if any states have been toggled public bool ToggleState(HashSet <int> idsToToggle) { if (idsToToggle.Count == 0) { return(false); } foreach (var i in idsToToggle) { stateList.ToggleElement(i); } //save to serialized object if saving if (stateListProp != null) { stateListProp.Clear(); foreach (var i in stateList) { stateListProp.AddNew().SetValue(i); } } return(true); }