This file contains 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