[英]Getting errors while creating a custom terrain editor (Unity C#)
我創建了兩個名為“CustomTerrain”和“CustomTerrainEditor”的腳本。 這是后者的代碼:
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
}
我不明白我做錯了什么。 謝謝您的幫助!
首先,將 typeOf 更改為 typeof。
接下來,如果 CustomTerrain 在另一個命名空間中,則將此空間添加到您的腳本中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.