BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / Spatializer / scripts / ONSPVersion.cs

ONSPVersion.cs

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