Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEditor;
- [CustomEditor(typeof(TraineeMasterList))]
- public class TraineeListEditor : Editor
- {
- public override void OnInspectorGUI(){
- base.OnInspectorGUI();
- if(GUILayout.Button("Index Trainee Defaults")){
- //Debug.Log("Button Pressed!");
- string[] guids = AssetDatabase.FindAssets("t:TraineeSO", new[]{"Assets/Trainees"});
- Debug.Log(guids);
- for(int g = 0; g < guids.Length; g++){
- TraineeSO trainee = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guids [g]), typeof(TraineeSO)) as TraineeSO;
- Debug.Log(trainee.name + " found!");
- //Inventory.instance.trainees.RemoveAll();
- //Debug.Log("Trainees Cleared!!!");
- TraineeMasterList.instance.traineeMaster.Add(trainee2);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement