I created two scripts called "CustomTerrain" and "CustomTerrainEditor". Here is the code for the latter:
using UnityEngine;
using UnityEditor;
using EditorGUITable;
[CustomEditor(typeOf(CustomTerrain))] // Links editor code in here with CustomTerrain.cs
[CanEditMultipleObjects]
public class CustomTerrainEditor : Editor
{
void OnEnable() {}
public override void OnInspectorGUI() {} // The GUI we will see in the inspector
}
I don't understand what I am doing wrong. Thanks for the help!
First, change typeOf to typeof.
And next if CustomTerrain in another namespace, add this space to your script.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.