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.

63 lines
1.8 KiB

  1. /************************************************************************************
  2. Filename : ONSPVersion.cs
  3. Content : Get version number of plug-in
  4. Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
  5. Licensed under the Oculus SDK Version 3.5 (the "License");
  6. you may not use the Oculus SDK except in compliance with the License,
  7. which is provided at the time of installation or download, or which
  8. otherwise accompanies this software in either electronic or hard copy form.
  9. You may obtain a copy of the License at
  10. https://developer.oculus.com/licenses/sdk-3.5/
  11. Unless required by applicable law or agreed to in writing, the Oculus SDK
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. ************************************************************************************/
  17. using UnityEngine;
  18. using System;
  19. using System.Runtime.InteropServices;
  20. public class ONSPVersion : MonoBehaviour
  21. {
  22. // Import functions
  23. public const string strONSPS = "AudioPluginOculusSpatializer";
  24. [DllImport(strONSPS)]
  25. private static extern void ONSP_GetVersion(ref int Major, ref int Minor, ref int Patch);
  26. /// <summary>
  27. /// Awake this instance.
  28. /// </summary>
  29. void Awake()
  30. {
  31. int major = 0;
  32. int minor = 0;
  33. int patch = 0;
  34. ONSP_GetVersion(ref major, ref minor, ref patch);
  35. String version = System.String.Format
  36. ("ONSP Version: {0:F0}.{1:F0}.{2:F0}", major, minor, patch);
  37. Debug.Log(version);
  38. }
  39. /// <summary>
  40. /// Start this instance.
  41. /// </summary>
  42. void Start()
  43. {
  44. }
  45. /// <summary>
  46. /// Update this instance.
  47. /// </summary>
  48. void Update()
  49. {
  50. }
  51. }