PythonManager.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using UnityEditor.Scripting.Python;
  2. using UnityEditor;
  3. using UnityEngine;
  4. public class PythonManager
  5. {
  6. [MenuItem("Python/Create Heatmap")]
  7. static void RunPythonFile()
  8. {
  9. string scriptPath = Application.dataPath + @"/Depictions_Years/Scripts/Python/Heatmap.py";
  10. PythonRunner.RunFile(scriptPath);
  11. }
  12. [MenuItem("Python/Create Heatmap Multipe")]
  13. static void RunPythonFileMultiple()
  14. {
  15. string scriptPath = Application.dataPath + @"/Depictions_Years/Scripts/Python/Heatmap_Multiple.py";
  16. PythonRunner.RunFile(scriptPath);
  17. }
  18. [MenuItem("Python/Create 3D Heatmap")]
  19. static void RunPythonFile3D()
  20. {
  21. string scriptPath = Application.dataPath + @"/Depictions_Years/Scripts/Python/Heatmap_3D.py";
  22. PythonRunner.RunFile(scriptPath);
  23. }
  24. [MenuItem("Python/Create 3D Heatmap Multiple")]
  25. static void RunPythonFile3DMultiple()
  26. {
  27. string scriptPath = Application.dataPath + @"/Depictions_Years/Scripts/Python/Heatmap_3D_Multiple.py";
  28. PythonRunner.RunFile(scriptPath);
  29. }
  30. [MenuItem("Python/Open 3D Heatmap")]
  31. static void RunPythonFileOpen3D()
  32. {
  33. string scriptPath = Application.dataPath + @"/Depictions_Years/Scripts/Python/OpenHeatmap.py";
  34. PythonRunner.RunFile(scriptPath);
  35. }
  36. }