public static FriendShipCondition CreateConditionCollection() { FriendShipCondition newConditionCollection = CreateInstance <FriendShipCondition>(); newConditionCollection.description = "New condition collection"; newConditionCollection.addCondition = new Condition[1]; newConditionCollection.addCondition[0] = ConditionEditor.CreateCondition(); return(newConditionCollection); }
private void OnEnable() { friendShipCondition = (FriendShipCondition)target; if (target == null) { DestroyImmediate(this); Debug.Log("Destroy"); return; } descriptionProperty = serializedObject.FindProperty(descriptionPropertyName); requireFriendlyProperty = serializedObject.FindProperty(requireFriendlyPropertyName); addConditionProperty = serializedObject.FindProperty(addConditionPropertyName); CheckAndCreateSubEditors(friendShipCondition.addCondition); }