private GameObject m_InputNpcObject; //ByObject #region MonoBehavior private void OnGUI() { DrawBaseInfo(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("添加方式 :", GUILayout.Width(80f)); m_eAddNpcType = (EAddNpcType)EditorGUILayout.Popup((int)m_eAddNpcType, NPCTYPENAME, GUILayout.Width(80f)); } EditorGUILayout.EndHorizontal(); switch (m_eAddNpcType) { case EAddNpcType.ByID: DrawNpcByID(); break; case EAddNpcType.ByObject: DrawNpcByObject(); break; } }
private GameObject m_InputNpcObject; //ByObject #region MonoBehavior private void OnGUI() { DrawBaseInfo(); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.LabelField("添加方式 :", GUILayout.Width(80f)); m_eAddNpcType = (EAddNpcType)EditorGUILayout.Popup((int)m_eAddNpcType, NPCTYPENAME, GUILayout.Width(80f)); } EditorGUILayout.EndHorizontal(); switch (m_eAddNpcType) { case EAddNpcType.ByID: DrawNpcByID(); break; case EAddNpcType.ByObject: DrawNpcByObject(); break; } }