| | |
| | | int _count = br.ReadInt32(); |
| | | for (int i = 0; i < _count; ++i) |
| | | { |
| | | var _go = new GameObject(); |
| | | var _resName = br.ReadString(); |
| | | GameObject _go = null; |
| | | |
| | | if (!string.IsNullOrEmpty(_resName.Trim())) |
| | | { |
| | | string _path = "Assets/ResourcesOut/Mob/Prefab_Race_" + _resName + ".prefab"; |
| | | _go = AssetDatabase.LoadAssetAtPath<GameObject>(_path); |
| | | if (_go) |
| | | { |
| | | _go = Instantiate(_go); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _go = GameObject.CreatePrimitive(PrimitiveType.Capsule); |
| | | } |
| | | |
| | | _go.transform.SetParent(transform); |
| | | _go.transform.localPosition = Vector3.zero; |
| | | _go.transform.eulerAngles = Vector3.zero; |
| | |
| | | for (int i = monsterList.Count - 1; i >= 0; --i) |
| | | { |
| | | EditorGUILayout.BeginHorizontal(GUILayout.Height(22)); |
| | | EditorGUILayout.LabelField("NPCID", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(50)); |
| | | EditorGUILayout.LabelField(monsterList[i].npcID.ToString(), guiSkin.textField, GUILayout.Height(20)); |
| | | EditorGUILayout.LabelField("模型名", guiSkin.customStyles[0], GUILayout.Height(22), GUILayout.Width(50)); |
| | | EditorGUILayout.LabelField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(22), GUILayout.Width(70)); |
| | | EditorGUILayout.LabelField("NPCID", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50)); |
| | | EditorGUILayout.LabelField(monsterList[i].npcID.ToString(), guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70)); |
| | | EditorGUILayout.LabelField("模型名", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(50)); |
| | | EditorGUILayout.LabelField(monsterList[i].resName, guiSkin.textField, GUILayout.Height(20), GUILayout.Width(70)); |
| | | if (GUILayout.Button("定高", guiSkin.button, GUILayout.Width(60), GUILayout.Height(20))) |
| | | { |
| | | Vector3 _pos = monsterList[i].transform.position; |