Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
666B

  1. #if UNITY_EDITOR
  2. using UnityEditor;
  3. //This profiler is based on the Entitas Visual Debugging tool
  4. //https://github.com/sschmid/Entitas-CSharp
  5. namespace Svelto.ECS.Profiler
  6. {
  7. class EngineProfilerMenuItem
  8. {
  9. [MenuItem("Engines/Enable Profiler")]
  10. public static void EnableProfiler()
  11. {
  12. PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, "ENGINE_PROFILER_ENABLED");
  13. }
  14. [MenuItem("Engines/Disable Profiler")]
  15. public static void DisableProfiler()
  16. {
  17. PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, "");
  18. }
  19. }
  20. }
  21. #endif