void InspectSpellEffects(string label, ref SpellEffectCollection spellEffects) { spellEffects = ScriptableObjectEditorUtil.ToggleAddRemoveScriptableObject(label, target, spellEffects); if (spellEffects != null) { ++EditorGUI.indentLevel; InspectSpellEffects(spellEffects); --EditorGUI.indentLevel; } }
void InspectSpellEffects(SpellEffectCollection collection) { //InspectArrayWithInheritance(ref arr); // for some reason we cannot find the children of the original SO, so we create a new one here, and it works magically var so = new SerializedObject(collection); var prop = so.FindProperty("Effects"); var arr = collection.Effects; var list = spellEffectLists.GetOrCreate(null, so, prop, arr); list.Render(); }