LuaDeepProfilerAssetSetting.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using UnityEngine;
  2. using UnityEditor;
  3. #if UNITY_EDITOR
  4. namespace MikuLuaProfiler
  5. {
  6. public class LuaDeepProfilerAssetSetting : ScriptableObject
  7. {
  8. #region memeber
  9. public bool isDeepMonoProfiler = false;
  10. public bool isDeepLuaProfiler = false;
  11. private static LuaDeepProfilerAssetSetting instance;
  12. public static LuaDeepProfilerAssetSetting Instance
  13. {
  14. get
  15. {
  16. if (instance == null)
  17. {
  18. instance = AssetDatabase.LoadAssetAtPath<LuaDeepProfilerAssetSetting>("Assets/LuaDeepProfilerAssetSetting.asset");
  19. if (instance == null)
  20. {
  21. UnityEngine.Debug.Log("Lua Profiler: cannot find integration settings, creating default settings");
  22. instance = CreateInstance<LuaDeepProfilerAssetSetting>();
  23. instance.name = "Lua Profiler Integration Settings";
  24. #if UNITY_EDITOR
  25. AssetDatabase.CreateAsset(instance, "Assets/LuaDeepProfilerAssetSetting.asset");
  26. #endif
  27. }
  28. }
  29. return instance;
  30. }
  31. }
  32. #endregion
  33. }
  34. }
  35. #endif