ArtResConf.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections.Generic;
  2. #if UNITY_EDITOR
  3. using UnityEditor;
  4. #endif
  5. using UnityEngine;
  6. using XRTool.Util;
  7. namespace ShadowStudio.Model
  8. {
  9. public class ArtResConf : ScriptableObject
  10. {
  11. public List<Object> resModelList;
  12. public ArtType artType;
  13. public InstaceType instaceType = InstaceType.References;
  14. #if UNITY_EDITOR
  15. [MenuItem("Assets/Create/DataBase/ArtResConf", false, 0)]
  16. static void CreateDynamicConf()
  17. {
  18. Object obj = Selection.activeObject;
  19. if (obj)
  20. {
  21. string path = AssetDatabase.GetAssetPath(obj);
  22. ArtResConf bullet = CreateInstance<ArtResConf>();
  23. if (bullet)
  24. {
  25. string confName = UnityUtil.TryGetName<ArtResConf>(path);
  26. AssetDatabase.CreateAsset(bullet, confName);
  27. }
  28. else
  29. {
  30. Debug.Log(typeof(ArtResConf) + " is null");
  31. }
  32. }
  33. }
  34. #endif
  35. }
  36. }