Assignment for RMIT Mixed Reality in 2020
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.

37 lines
958 B

  1. using UnityEngine;
  2. using UnityEditor;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. public class BuildAssetPackages
  8. {
  9. enum BuildConfiguration
  10. {
  11. Windows,
  12. Android
  13. }
  14. public static void Build()
  15. {
  16. Debug.Log("Building Deliverables");
  17. ExportPackages();
  18. }
  19. public static void ExportPackages()
  20. {
  21. string[] assets = AssetDatabase.FindAssets("t:Object", null).Select(s=>AssetDatabase.GUIDToAssetPath(s)).ToArray();
  22. assets = assets.Where(s=>
  23. s.StartsWith("Assets/Oculus/Avatar/") ||
  24. s.StartsWith("Assets/Oculus/AudioManager/") ||
  25. s.StartsWith("Assets/Oculus/LipSync/") ||
  26. s.StartsWith("Assets/Oculus/Platform/") ||
  27. s.StartsWith("Assets/Oculus/Spatializer/") ||
  28. s.StartsWith("Assets/Oculus/VoiceMod/") ||
  29. s.StartsWith("Assets/Oculus/VR/") ||
  30. s.StartsWith("Assets/Oculus/SampleFramework/")
  31. ).ToArray();
  32. AssetDatabase.ExportPackage(assets, "OculusIntegration.unitypackage");
  33. }
  34. }