Last active
April 15, 2021 08:08
-
-
Save quizcanners/d2e44a9b6db01074f6d845e689fb4d3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Article: https://medium.com/@quizcanners/unity-i-have-a-custom-editor-for-every-script-5eddf20fdacc | |
using System.Collections.Generic; | |
using QuizCanners.Inspector; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class SomeScript : MonoBehaviour: IPEGI { | |
public List<SomeData> list = new List<SomeData>(); | |
private int inspecteedElement = -1; | |
public void Inspect() | |
{ | |
"My Important list".edit_List(ref list, ref inspecteedElement); | |
} | |
} | |
#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