Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Article: https://medium.com/@quizcanners/unity-i-have-a-custom-editor-for-every-script-5eddf20fdacc
using System.Collections.Generic;
using PlayerAndEditorGUI;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class SomeScript : MonoBehaviour: IPEGI {
public List<SomeData> list = new List<SomeData>();
private int inspecteedElement = -1;
public bool Inspect() {
var changed = "My Important list".edit_List(ref list, ref inspecteedElement);
return changed;
}
}
#if UNITY_EDITOR
[CustomEditor(typeof(SomeScript))]
public class SomeScriptDrawer : PEGI_Inspector<SomeScript> { }
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.