public static void LoadModules() { sColors[CATES[CATE_COMPOSITE]] = new Color(0.3f, 0.3f, 0.3f); sColors[CATES[CATE_TASK]] = new Color(0.6f, 0.1f, 1f); sColors[CATES[CATE_SERVICE]] = new Color(0.1f, 0.35f, 0.1f); sColors[CATES[CATE_CONDITION]] = new Color(0.1f, 0.3f, 0.5f); sSharedTypes.Clear(); sSharedTypes.Add(typeof(GameObject)); sSharedTypes.Add(typeof(Transform)); sSharedTypes.Add(typeof(float)); sSharedTypes.Add(typeof(bool)); sSharedTypes.Add(typeof(int)); sSharedTypes.Add(typeof(Vector3)); sSharedTypes.Add(typeof(string)); icon = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/DevilFramework/Gizmos/AI Icons/BehaviourTree Icon.png"); for (int i = 0; i < sModules.Length; i++) { sModules[i] = new List <Module>(); } sAllModules.Clear(); List <System.Type> lst = new List <System.Type>(); Ref.GetAssemblyTypes(lst); foreach (var tp in lst) { var mod = Module.GetModule(tp); if (mod != null) { sAllModules.Add(mod); sModules[mod.CategoryId].Add(mod); } var bts = Ref.GetCustomAttribute <BTSharedTypeAttribute>(tp); if (bts != null) { sSharedTypes.Add(tp); } } sSharedTypes.Add(typeof(object)); sSharedTypeNames = new string[sSharedTypes.Count]; for (int i = 0; i < sSharedTypeNames.Length; i++) { sSharedTypeNames[i] = sSharedTypes[i].FullName; } BehaviourTreeEditor.InitModules(); OnReloead(); }