In this tutorial. I will show you how can be Unity Editor customized withSerializeField features.
You need to open a new scene and add a new GameObject and rename it if you want.
On this GameObject add a new script with a good name, I used the EditorScript001.cs file name.
In this script I add this source code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | using System.Collections; using System.Collections.Generic; using UnityEngine; public class EditorScript001 : MonoBehaviour { [Header("Changes in editor")] [SerializeField] private string _name; [SerializeField] private int _integer; [SerializeField] private float _float; [SerializeField] [Range(-1, 1)] private float _slider_001_float; [SerializeField][Range(-1, 1)] [Tooltip("Select for ...")] private float _slider_002_float; [Header("Dialog")] [SerializeField] [Tooltip("Some strings for ...")] [TextArea()] private string _area001_string; [SerializeField] [Tooltip("Some strings for ...")] [TextArea(5,5)] private string _area002_string; public enum Select { None = 0, ElementOne, ElementTwo, ElementThree } [SerializeField] private Select _varSelect = Select.None; } |
If you run you can see the Unity 3D editor will add new features for your development.
This is an easy way to make changes.