Working experiment hooray
This commit is contained in:
9
Assets/Oculus/Platform/Editor.meta
Normal file
9
Assets/Oculus/Platform/Editor.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f9ce25317fec85488742d218950bf3d
|
||||
folderAsset: yes
|
||||
timeCreated: 1520037586
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
45
Assets/Oculus/Platform/Editor/GUIHelper.cs
Normal file
45
Assets/Oculus/Platform/Editor/GUIHelper.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
class GUIHelper {
|
||||
public delegate void Worker();
|
||||
|
||||
static void InOut(Worker begin, Worker body, Worker end) {
|
||||
try {
|
||||
begin();
|
||||
body();
|
||||
} finally {
|
||||
end();
|
||||
}
|
||||
}
|
||||
|
||||
public static void HInset(int pixels, Worker worker) {
|
||||
InOut(
|
||||
() => {
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(pixels);
|
||||
GUILayout.BeginVertical();
|
||||
},
|
||||
worker,
|
||||
() => {
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public delegate T ControlWorker<T>();
|
||||
public static T MakeControlWithLabel<T>(GUIContent label, ControlWorker<T> worker) {
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(label);
|
||||
|
||||
var result = worker();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Editor/GUIHelper.cs.meta
Normal file
12
Assets/Oculus/Platform/Editor/GUIHelper.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19bb2c637ba6e9c459e3db36b2ec10c3
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
251
Assets/Oculus/Platform/Editor/OculusPlatformSettingsEditor.cs
Normal file
251
Assets/Oculus/Platform/Editor/OculusPlatformSettingsEditor.cs
Normal file
@@ -0,0 +1,251 @@
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
// This classes implements a UI to edit the PlatformSettings class.
|
||||
// The UI is accessible from a the menu bar via: Oculus Platform -> Edit Settings
|
||||
[CustomEditor(typeof(PlatformSettings))]
|
||||
public class OculusPlatformSettingsEditor : Editor
|
||||
{
|
||||
private bool isUnityEditorSettingsExpanded;
|
||||
private bool isBuildSettingsExpanded;
|
||||
|
||||
private WWW getAccessTokenRequest;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
isUnityEditorSettingsExpanded = PlatformSettings.UseStandalonePlatform;
|
||||
#if UNITY_ANDROID
|
||||
isBuildSettingsExpanded = true;
|
||||
#else
|
||||
isBuildSettingsExpanded = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
[UnityEditor.MenuItem("Oculus Platform/Edit Settings")]
|
||||
public static void Edit()
|
||||
{
|
||||
UnityEditor.Selection.activeObject = PlatformSettings.Instance;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
//
|
||||
// Application IDs section
|
||||
//
|
||||
GUIContent riftAppIDLabel = new GUIContent("Oculus Rift App Id [?]", "This AppID will be used when building to the Windows target.");
|
||||
GUIContent gearAppIDLabel = new GUIContent("Gear VR App Id [?]", "This AppID will be used when building to the Android target");
|
||||
PlatformSettings.AppID = MakeTextBox(riftAppIDLabel, PlatformSettings.AppID);
|
||||
PlatformSettings.MobileAppID = MakeTextBox(gearAppIDLabel, PlatformSettings.MobileAppID);
|
||||
|
||||
if (GUILayout.Button("Create / Find your app on https://dashboard.oculus.com"))
|
||||
{
|
||||
UnityEngine.Application.OpenURL("https://dashboard.oculus.com/");
|
||||
}
|
||||
|
||||
#if UNITY_ANDROID
|
||||
if (String.IsNullOrEmpty(PlatformSettings.MobileAppID))
|
||||
{
|
||||
EditorGUILayout.HelpBox("Please enter a valid Gear VR App ID.", MessageType.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = "Configured to connect with App ID " + PlatformSettings.MobileAppID;
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Info);
|
||||
}
|
||||
#else
|
||||
if (String.IsNullOrEmpty(PlatformSettings.AppID))
|
||||
{
|
||||
EditorGUILayout.HelpBox("Please enter a valid Oculus Rift App ID.", MessageType.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = "Configured to connect with App ID " + PlatformSettings.AppID;
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Info);
|
||||
}
|
||||
#endif
|
||||
EditorGUILayout.Separator();
|
||||
|
||||
//
|
||||
// Unity Editor Settings section
|
||||
//
|
||||
isUnityEditorSettingsExpanded = EditorGUILayout.Foldout(isUnityEditorSettingsExpanded, "Unity Editor Settings");
|
||||
if (isUnityEditorSettingsExpanded)
|
||||
{
|
||||
GUIHelper.HInset(6, () =>
|
||||
{
|
||||
bool HasTestAccessToken = !String.IsNullOrEmpty(StandalonePlatformSettings.OculusPlatformTestUserAccessToken);
|
||||
if (PlatformSettings.UseStandalonePlatform)
|
||||
{
|
||||
if (!HasTestAccessToken &&
|
||||
(String.IsNullOrEmpty(StandalonePlatformSettings.OculusPlatformTestUserEmail) ||
|
||||
String.IsNullOrEmpty(StandalonePlatformSettings.OculusPlatformTestUserPassword)))
|
||||
{
|
||||
EditorGUILayout.HelpBox("Please enter a valid user credentials.", MessageType.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = "The Unity editor will use the supplied test user credentials and operate in standalone mode. Some user data will be mocked.";
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var msg = "The Unity editor will use the user credentials from the Oculus application.";
|
||||
EditorGUILayout.HelpBox(msg, MessageType.Info);
|
||||
}
|
||||
|
||||
var useStandaloneLabel = "Use Standalone Platform [?]";
|
||||
var useStandaloneHint = "If this is checked your app will use a debug platform with the User info below. "
|
||||
+ "Otherwise your app will connect to the Oculus Platform. This setting only applies to the Unity Editor";
|
||||
PlatformSettings.UseStandalonePlatform =
|
||||
MakeToggle(new GUIContent(useStandaloneLabel, useStandaloneHint), PlatformSettings.UseStandalonePlatform);
|
||||
|
||||
GUI.enabled = PlatformSettings.UseStandalonePlatform;
|
||||
|
||||
if (!HasTestAccessToken)
|
||||
{
|
||||
var emailLabel = "Test User Email: ";
|
||||
var emailHint = "Test users can be configured at " +
|
||||
"https://dashboard.oculus.com/organizations/<your org ID>/testusers " +
|
||||
"however any valid Oculus account email may be used.";
|
||||
StandalonePlatformSettings.OculusPlatformTestUserEmail =
|
||||
MakeTextBox(new GUIContent(emailLabel, emailHint), StandalonePlatformSettings.OculusPlatformTestUserEmail);
|
||||
|
||||
var passwdLabel = "Test User Password: ";
|
||||
var passwdHint = "Password associated with the email address.";
|
||||
StandalonePlatformSettings.OculusPlatformTestUserPassword =
|
||||
MakePasswordBox(new GUIContent(passwdLabel, passwdHint), StandalonePlatformSettings.OculusPlatformTestUserPassword);
|
||||
|
||||
var isLoggingIn = (getAccessTokenRequest != null);
|
||||
var loginLabel = (!isLoggingIn) ? "Login" : "Logging in...";
|
||||
|
||||
GUI.enabled = !isLoggingIn;
|
||||
if (GUILayout.Button(loginLabel))
|
||||
{
|
||||
WWWForm form = new WWWForm();
|
||||
var headers = form.headers;
|
||||
headers.Add("Authorization", "Bearer OC|1141595335965881|");
|
||||
form.AddField("email", StandalonePlatformSettings.OculusPlatformTestUserEmail);
|
||||
form.AddField("password", StandalonePlatformSettings.OculusPlatformTestUserPassword);
|
||||
|
||||
// Start the WWW request to get the access token
|
||||
getAccessTokenRequest = new WWW("https://graph.oculus.com/login", form.data, headers);
|
||||
EditorApplication.update += GetAccessToken;
|
||||
}
|
||||
GUI.enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
var loggedInMsg = "Currently using the credentials associated with " + StandalonePlatformSettings.OculusPlatformTestUserEmail;
|
||||
EditorGUILayout.HelpBox(loggedInMsg, MessageType.Info);
|
||||
|
||||
var logoutLabel = "Clear Credentials";
|
||||
|
||||
if (GUILayout.Button(logoutLabel))
|
||||
{
|
||||
StandalonePlatformSettings.OculusPlatformTestUserAccessToken = "";
|
||||
}
|
||||
}
|
||||
|
||||
GUI.enabled = true;
|
||||
});
|
||||
}
|
||||
EditorGUILayout.Separator();
|
||||
|
||||
//
|
||||
// Build Settings section
|
||||
//
|
||||
isBuildSettingsExpanded = EditorGUILayout.Foldout(isBuildSettingsExpanded, "Build Settings");
|
||||
if (isBuildSettingsExpanded)
|
||||
{
|
||||
GUIHelper.HInset(6, () => {
|
||||
if (!PlayerSettings.virtualRealitySupported)
|
||||
{
|
||||
EditorGUILayout.HelpBox("VR Support isn't enabled in the Player Settings", MessageType.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("VR Support is enabled", MessageType.Info);
|
||||
}
|
||||
|
||||
PlayerSettings.virtualRealitySupported = MakeToggle(new GUIContent("Virtual Reality Support"), PlayerSettings.virtualRealitySupported);
|
||||
PlayerSettings.bundleVersion = MakeTextBox(new GUIContent("Bundle Version"), PlayerSettings.bundleVersion);
|
||||
#if UNITY_5_3 || UNITY_5_4 || UNITY_5_5
|
||||
PlayerSettings.bundleIdentifier = MakeTextBox(new GUIContent("Bundle Identifier"), PlayerSettings.bundleIdentifier);
|
||||
#else
|
||||
BuildTargetGroup buildTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
|
||||
PlayerSettings.SetApplicationIdentifier(
|
||||
buildTargetGroup,
|
||||
MakeTextBox(
|
||||
new GUIContent("Bundle Identifier"),
|
||||
PlayerSettings.GetApplicationIdentifier(buildTargetGroup)));
|
||||
#endif
|
||||
});
|
||||
}
|
||||
EditorGUILayout.Separator();
|
||||
}
|
||||
|
||||
// Asyncronously fetch the access token with the given credentials
|
||||
private void GetAccessToken()
|
||||
{
|
||||
if (getAccessTokenRequest != null && getAccessTokenRequest.isDone)
|
||||
{
|
||||
|
||||
// Clear the password
|
||||
StandalonePlatformSettings.OculusPlatformTestUserPassword = "";
|
||||
|
||||
if (String.IsNullOrEmpty(getAccessTokenRequest.error))
|
||||
{
|
||||
var Response = JsonUtility.FromJson<OculusStandalonePlatformResponse>(getAccessTokenRequest.text);
|
||||
StandalonePlatformSettings.OculusPlatformTestUserAccessToken = Response.access_token;
|
||||
}
|
||||
|
||||
GUI.changed = true;
|
||||
EditorApplication.update -= GetAccessToken;
|
||||
getAccessTokenRequest = null;
|
||||
}
|
||||
}
|
||||
|
||||
private string MakeTextBox(GUIContent label, string variable)
|
||||
{
|
||||
return GUIHelper.MakeControlWithLabel(label, () => {
|
||||
GUI.changed = false;
|
||||
var result = EditorGUILayout.TextField(variable);
|
||||
SetDirtyOnGUIChange();
|
||||
return result;
|
||||
});
|
||||
}
|
||||
private string MakePasswordBox(GUIContent label, string variable)
|
||||
{
|
||||
return GUIHelper.MakeControlWithLabel(label, () => {
|
||||
GUI.changed = false;
|
||||
var result = EditorGUILayout.PasswordField(variable);
|
||||
SetDirtyOnGUIChange();
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private bool MakeToggle(GUIContent label, bool variable)
|
||||
{
|
||||
return GUIHelper.MakeControlWithLabel(label, () => {
|
||||
GUI.changed = false;
|
||||
var result = EditorGUILayout.Toggle(variable);
|
||||
SetDirtyOnGUIChange();
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
private void SetDirtyOnGUIChange()
|
||||
{
|
||||
if (GUI.changed)
|
||||
{
|
||||
EditorUtility.SetDirty(PlatformSettings.Instance);
|
||||
GUI.changed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03780432f190e734dba71a2337880cdb
|
||||
timeCreated: 1523486796
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using System;
|
||||
|
||||
[Serializable]
|
||||
public sealed class OculusStandalonePlatformResponse
|
||||
{
|
||||
public string access_token;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81f0418e197774a4e8d643b56923cb90
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Oculus/Platform/Plugins.meta
Normal file
9
Assets/Oculus/Platform/Plugins.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e72147a7ff1b1834884902389de3ceaa
|
||||
folderAsset: yes
|
||||
timeCreated: 1522867156
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Oculus/Platform/Plugins/Android32.meta
Normal file
9
Assets/Oculus/Platform/Plugins/Android32.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28b08062056958243b2a1fc197e3e492
|
||||
folderAsset: yes
|
||||
timeCreated: 1522867161
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/Platform/Plugins/Android32/libovrplatformloader.so
Normal file
BIN
Assets/Oculus/Platform/Plugins/Android32/libovrplatformloader.so
Normal file
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32f3938b889ed054faaaeb5cdf110208
|
||||
timeCreated: 1533910673
|
||||
licenseType: Store
|
||||
PluginImporter:
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
data:
|
||||
first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
data:
|
||||
first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
data:
|
||||
first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Oculus/Platform/Plugins/MacOSX.meta
Normal file
9
Assets/Oculus/Platform/Plugins/MacOSX.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbf91bf2744b48c4baafc1677856a917
|
||||
folderAsset: yes
|
||||
timeCreated: 1520037586
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
109
Assets/Oculus/Platform/Plugins/MacOSX/ovrplatform.bundle.meta
Normal file
109
Assets/Oculus/Platform/Plugins/MacOSX/ovrplatform.bundle.meta
Normal file
@@ -0,0 +1,109 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c42a6ff47d7e214ebe1680db3ea6170
|
||||
folderAsset: yes
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 0
|
||||
Exclude Linux: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude LinuxUniversal: 1
|
||||
Exclude OSXIntel: 0
|
||||
Exclude OSXIntel64: 0
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
'': Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
OS: OSX
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: OSX
|
||||
- first:
|
||||
Facebook: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Facebook: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Linux
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
Standalone: OSXIntel
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXIntel64
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86ca9bf6b12d41d4a94a1afe0d75df38
|
||||
folderAsset: yes
|
||||
timeCreated: 1536799186
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 858b96d02f6d8da4ab608efcad6762a9
|
||||
timeCreated: 1533910657
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d48b2a6e1c9cc2c4ca14a0ece5ec41c2
|
||||
folderAsset: yes
|
||||
timeCreated: 1536799186
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13f451d276fc22e4bb323736aaf3031b
|
||||
timeCreated: 1533910657
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1 @@
|
||||
APPLWRUN
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 415b641ea40a9ac4d9437f7a77a03a06
|
||||
timeCreated: 1533910657
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02aaf4ee6ca337e4aa713c195dd164cf
|
||||
folderAsset: yes
|
||||
timeCreated: 1536799186
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be9385f891582c94887c497d6db87428
|
||||
folderAsset: yes
|
||||
timeCreated: 1536799186
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d10cf30c392aad845855ae98b1bdbce8
|
||||
timeCreated: 1533910657
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 159aa4d8c7a47b04eafa4b8d7b27cd93
|
||||
folderAsset: yes
|
||||
timeCreated: 1536799186
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Resources/darwin-x86_64/liboculus_p2p.dylib</key>
|
||||
<data>
|
||||
QLqWrFkjKvpYBdXZLLjN1SP9rdE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Resources/darwin-x86_64/liboculus_p2p.dylib</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
0cFSOY1JRQxYH8BXxfQpCWxuZXUcea92du8tjeNOJCg=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Resources/Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d7ca10cc65a14d4883ae33260494948
|
||||
timeCreated: 1533910657
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Oculus/Platform/Scripts.meta
Normal file
9
Assets/Oculus/Platform/Scripts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06dc35cc5b7e7eb4ca0b52e7a0bea56d
|
||||
folderAsset: yes
|
||||
timeCreated: 1520037586
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
37
Assets/Oculus/Platform/Scripts/AbuseReportOptions.cs
Normal file
37
Assets/Oculus/Platform/Scripts/AbuseReportOptions.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AbuseReportOptions {
|
||||
|
||||
public AbuseReportOptions() {
|
||||
Handle = CAPI.ovr_AbuseReportOptions_Create();
|
||||
}
|
||||
|
||||
public void SetPreventPeopleChooser(bool value) {
|
||||
CAPI.ovr_AbuseReportOptions_SetPreventPeopleChooser(Handle, value);
|
||||
}
|
||||
|
||||
public void SetReportType(AbuseReportType value) {
|
||||
CAPI.ovr_AbuseReportOptions_SetReportType(Handle, value);
|
||||
}
|
||||
|
||||
|
||||
// For passing to native C
|
||||
public static explicit operator IntPtr(AbuseReportOptions options) {
|
||||
return options != null ? options.Handle : IntPtr.Zero;
|
||||
}
|
||||
|
||||
~AbuseReportOptions() {
|
||||
CAPI.ovr_AbuseReportOptions_Destroy(Handle);
|
||||
}
|
||||
|
||||
IntPtr Handle;
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/AbuseReportOptions.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/AbuseReportOptions.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0645da8344fc475469d13a6494437f8e
|
||||
timeCreated: 1533910660
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Assets/Oculus/Platform/Scripts/AbuseReportType.cs
Normal file
21
Assets/Oculus/Platform/Scripts/AbuseReportType.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum AbuseReportType : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("OBJECT")]
|
||||
Object,
|
||||
|
||||
[Description("USER")]
|
||||
User,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/AbuseReportType.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/AbuseReportType.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c69cf9c4f527f9e4a8dc49125afacc7b
|
||||
timeCreated: 1533910663
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Oculus/Platform/Scripts/AchievementType.cs
Normal file
24
Assets/Oculus/Platform/Scripts/AchievementType.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum AchievementType : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("SIMPLE")]
|
||||
Simple,
|
||||
|
||||
[Description("BITFIELD")]
|
||||
Bitfield,
|
||||
|
||||
[Description("COUNT")]
|
||||
Count,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/AchievementType.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/AchievementType.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42d96355ad5dd4b4eab18452dbd62fa7
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
35
Assets/Oculus/Platform/Scripts/AndroidPlatform.cs
Normal file
35
Assets/Oculus/Platform/Scripts/AndroidPlatform.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System;
|
||||
|
||||
public class AndroidPlatform
|
||||
{
|
||||
public bool Initialize(string appId)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
if(String.IsNullOrEmpty(appId))
|
||||
{
|
||||
throw new UnityException("AppID must not be null or empty");
|
||||
}
|
||||
return CAPI.ovr_UnityInitWrapper(appId);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
public Request<Models.PlatformInitialize> AsyncInitialize(string appId)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
if(String.IsNullOrEmpty(appId))
|
||||
{
|
||||
throw new UnityException("AppID must not be null or empty");
|
||||
}
|
||||
return new Request<Models.PlatformInitialize>(CAPI.ovr_UnityInitWrapperAsynchronous(appId));
|
||||
#else
|
||||
return new Request<Models.PlatformInitialize>(0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/AndroidPlatform.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/AndroidPlatform.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7293b4a3c3806ad448e3b421baf984b1
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Assets/Oculus/Platform/Scripts/ApplicationOptions.cs
Normal file
33
Assets/Oculus/Platform/Scripts/ApplicationOptions.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ApplicationOptions {
|
||||
|
||||
public ApplicationOptions() {
|
||||
Handle = CAPI.ovr_ApplicationOptions_Create();
|
||||
}
|
||||
|
||||
public void SetDeeplinkMessage(string value) {
|
||||
CAPI.ovr_ApplicationOptions_SetDeeplinkMessage(Handle, value);
|
||||
}
|
||||
|
||||
|
||||
// For passing to native C
|
||||
public static explicit operator IntPtr(ApplicationOptions options) {
|
||||
return options != null ? options.Handle : IntPtr.Zero;
|
||||
}
|
||||
|
||||
~ApplicationOptions() {
|
||||
CAPI.ovr_ApplicationOptions_Destroy(Handle);
|
||||
}
|
||||
|
||||
IntPtr Handle;
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/ApplicationOptions.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/ApplicationOptions.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d089d8a70f920a5469fca1917d5e5122
|
||||
timeCreated: 1523486800
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
126
Assets/Oculus/Platform/Scripts/BufferedAudioStream.cs
Normal file
126
Assets/Oculus/Platform/Scripts/BufferedAudioStream.cs
Normal file
@@ -0,0 +1,126 @@
|
||||
//#define VERBOSE_LOGGING
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System;
|
||||
|
||||
using Oculus.Platform;
|
||||
|
||||
public class BufferedAudioStream {
|
||||
const bool VerboseLogging = false;
|
||||
AudioSource audio;
|
||||
|
||||
float[] audioBuffer;
|
||||
int writePos;
|
||||
|
||||
const float bufferLengthSeconds = 0.25f;
|
||||
const int sampleRate = 48000;
|
||||
const int bufferSize = (int)(sampleRate * bufferLengthSeconds);
|
||||
const float playbackDelayTimeSeconds = 0.05f;
|
||||
|
||||
float playbackDelayRemaining;
|
||||
float remainingBufferTime;
|
||||
|
||||
public BufferedAudioStream(AudioSource audio) {
|
||||
audioBuffer = new float[bufferSize];
|
||||
this.audio = audio;
|
||||
|
||||
audio.loop = true;
|
||||
audio.clip = AudioClip.Create("", bufferSize, 1, sampleRate, false);
|
||||
|
||||
Stop();
|
||||
}
|
||||
|
||||
public void Update () {
|
||||
|
||||
if(remainingBufferTime > 0)
|
||||
{
|
||||
#if VERBOSE_LOGGING
|
||||
Debug.Log(string.Format("current time: {0}, remainingBufferTime: {1}", Time.time, remainingBufferTime));
|
||||
#endif
|
||||
|
||||
if (!audio.isPlaying && remainingBufferTime > playbackDelayTimeSeconds)
|
||||
{
|
||||
playbackDelayRemaining -= Time.deltaTime;
|
||||
if (playbackDelayRemaining <= 0)
|
||||
{
|
||||
#if VERBOSE_LOGGING
|
||||
Debug.Log("Starting playback");
|
||||
#endif
|
||||
audio.Play();
|
||||
}
|
||||
}
|
||||
|
||||
if (audio.isPlaying)
|
||||
{
|
||||
remainingBufferTime -= Time.deltaTime;
|
||||
if (remainingBufferTime < 0)
|
||||
{
|
||||
remainingBufferTime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (remainingBufferTime <= 0)
|
||||
{
|
||||
if (audio.isPlaying)
|
||||
{
|
||||
Debug.Log("Buffer empty, stopping " + DateTime.Now);
|
||||
Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (writePos != 0)
|
||||
{
|
||||
Debug.LogError("writePos non zero while not playing, how did this happen?");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Stop()
|
||||
{
|
||||
audio.Stop();
|
||||
audio.time = 0;
|
||||
writePos = 0;
|
||||
playbackDelayRemaining = playbackDelayTimeSeconds;
|
||||
}
|
||||
|
||||
public void AddData(float[] samples) {
|
||||
int remainingWriteLength = samples.Length;
|
||||
|
||||
if(writePos > audioBuffer.Length) {
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
do {
|
||||
int writeLength = remainingWriteLength;
|
||||
int remainingSpace = audioBuffer.Length - writePos;
|
||||
|
||||
if(writeLength > remainingSpace) {
|
||||
writeLength = remainingSpace;
|
||||
}
|
||||
|
||||
Array.Copy(samples, 0, audioBuffer, writePos, writeLength);
|
||||
|
||||
remainingWriteLength -= writeLength;
|
||||
writePos += writeLength;
|
||||
if(writePos > audioBuffer.Length) {
|
||||
throw new Exception();
|
||||
}
|
||||
if(writePos == audioBuffer.Length) {
|
||||
writePos = 0;
|
||||
}
|
||||
} while(remainingWriteLength > 0);
|
||||
|
||||
#if VERBOSE_LOGGING
|
||||
float prev = remainingBufferTime;
|
||||
#endif
|
||||
remainingBufferTime += (float)samples.Length / sampleRate;
|
||||
#if VERBOSE_LOGGING
|
||||
Debug.Log(string.Format("previous remaining: {0}, new remaining: {1}, added {2} samples", prev, remainingBufferTime, samples.Length));
|
||||
#endif
|
||||
audio.clip.SetData(audioBuffer, 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/BufferedAudioStream.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/BufferedAudioStream.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6d1f538558efdb42ae724d9bb36e538
|
||||
timeCreated: 1523486801
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
2930
Assets/Oculus/Platform/Scripts/CAPI.cs
Normal file
2930
Assets/Oculus/Platform/Scripts/CAPI.cs
Normal file
File diff suppressed because it is too large
Load Diff
12
Assets/Oculus/Platform/Scripts/CAPI.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/CAPI.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34df728904a3e304b84b2facc7fac233
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
164
Assets/Oculus/Platform/Scripts/Callback.cs
Normal file
164
Assets/Oculus/Platform/Scripts/Callback.cs
Normal file
@@ -0,0 +1,164 @@
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public static class Callback
|
||||
{
|
||||
#region Notification Callbacks: Exposed through Oculus.Platform.Platform
|
||||
|
||||
internal static void SetNotificationCallback<T>(Message.MessageType type, Message<T>.Callback callback)
|
||||
{
|
||||
if (callback == null) {
|
||||
throw new Exception ("Cannot provide a null notification callback.");
|
||||
}
|
||||
|
||||
notificationCallbacks[type] = new RequestCallback<T>(callback);
|
||||
|
||||
if (type == Message.MessageType.Notification_Room_InviteAccepted)
|
||||
{
|
||||
FlushRoomInviteNotificationQueue();
|
||||
}
|
||||
}
|
||||
|
||||
internal static void SetNotificationCallback(Message.MessageType type, Message.Callback callback)
|
||||
{
|
||||
if (callback == null) {
|
||||
throw new Exception ("Cannot provide a null notification callback.");
|
||||
}
|
||||
|
||||
notificationCallbacks[type] = new RequestCallback(callback);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OnComplete Callbacks: Exposed through Oculus.Platform.Request
|
||||
internal static void OnComplete<T>(Request<T> request, Message<T>.Callback callback)
|
||||
{
|
||||
requestIDsToCallbacks[request.RequestID] = new RequestCallback<T>(callback);
|
||||
}
|
||||
internal static void OnComplete(Request request, Message.Callback callback)
|
||||
{
|
||||
requestIDsToCallbacks[request.RequestID] = new RequestCallback(callback);
|
||||
}
|
||||
|
||||
internal static void RunCallbacks()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var msg = Platform.Message.PopMessage();
|
||||
if (msg == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
HandleMessage(msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static void RunLimitedCallbacks(uint limit)
|
||||
{
|
||||
for (var i = 0; i < limit; ++i)
|
||||
{
|
||||
var msg = Platform.Message.PopMessage();
|
||||
if (msg == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
HandleMessage(msg);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Callback Internals
|
||||
private static Dictionary<ulong, RequestCallback> requestIDsToCallbacks = new Dictionary<ulong, RequestCallback>();
|
||||
private static Dictionary<Message.MessageType, RequestCallback> notificationCallbacks = new Dictionary<Message.MessageType, RequestCallback>();
|
||||
|
||||
private static bool hasRegisteredRoomInviteNotificationHandler = false;
|
||||
private static List<Message> pendingRoomInviteNotifications = new List<Message>();
|
||||
private static void FlushRoomInviteNotificationQueue() {
|
||||
hasRegisteredRoomInviteNotificationHandler = true;
|
||||
foreach (Message msg in pendingRoomInviteNotifications) {
|
||||
HandleMessage(msg);
|
||||
}
|
||||
pendingRoomInviteNotifications.Clear();
|
||||
}
|
||||
|
||||
private class RequestCallback
|
||||
{
|
||||
private Message.Callback messageCallback;
|
||||
|
||||
public RequestCallback() { }
|
||||
|
||||
public RequestCallback(Message.Callback callback)
|
||||
{
|
||||
this.messageCallback = callback;
|
||||
}
|
||||
|
||||
public virtual void HandleMessage(Message msg)
|
||||
{
|
||||
if (messageCallback != null)
|
||||
{
|
||||
messageCallback(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class RequestCallback<T> : RequestCallback
|
||||
{
|
||||
private Message<T>.Callback callback;
|
||||
public RequestCallback(Message<T>.Callback callback)
|
||||
{
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
public override void HandleMessage(Message msg)
|
||||
{
|
||||
if (callback != null)
|
||||
{
|
||||
|
||||
// We need to queue up GameInvites because the callback runner will be called before a handler has beeen set.
|
||||
if (!hasRegisteredRoomInviteNotificationHandler && msg.Type == Message.MessageType.Notification_Room_InviteAccepted)
|
||||
{
|
||||
pendingRoomInviteNotifications.Add(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg is Message<T>)
|
||||
{
|
||||
callback((Message<T>)msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("Unable to handle message: " + msg.GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void HandleMessage(Message msg)
|
||||
{
|
||||
RequestCallback callbackHolder;
|
||||
if (requestIDsToCallbacks.TryGetValue(msg.RequestID, out callbackHolder))
|
||||
{
|
||||
try
|
||||
{
|
||||
callbackHolder.HandleMessage(msg);
|
||||
}
|
||||
// even if there are exceptions, we should clean up cleanly
|
||||
finally
|
||||
{
|
||||
requestIDsToCallbacks.Remove(msg.RequestID);
|
||||
}
|
||||
}
|
||||
else if (notificationCallbacks.TryGetValue(msg.Type, out callbackHolder))
|
||||
{
|
||||
callbackHolder.HandleMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/Callback.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/Callback.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41d3953e2b7bcb44d91f97e274f9f64d
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
38
Assets/Oculus/Platform/Scripts/CallbackRunner.cs
Normal file
38
Assets/Oculus/Platform/Scripts/CallbackRunner.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
public class CallbackRunner : MonoBehaviour
|
||||
{
|
||||
[DllImport(CAPI.DLL_NAME)]
|
||||
static extern void ovr_UnityResetTestPlatform();
|
||||
|
||||
public bool IsPersistantBetweenSceneLoads = true;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
var existingCallbackRunner = FindObjectOfType<CallbackRunner>();
|
||||
if (existingCallbackRunner != this)
|
||||
{
|
||||
Debug.LogWarning("You only need one instance of CallbackRunner");
|
||||
}
|
||||
if (IsPersistantBetweenSceneLoads)
|
||||
{
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
Request.RunCallbacks();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
ovr_UnityResetTestPlatform();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/CallbackRunner.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/CallbackRunner.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2caa5c6ad39b6742a7ddc2c273976c7
|
||||
timeCreated: 1523486801
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Assets/Oculus/Platform/Scripts/CloudStorageDataStatus.cs
Normal file
33
Assets/Oculus/Platform/Scripts/CloudStorageDataStatus.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum CloudStorageDataStatus : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("IN_SYNC")]
|
||||
InSync,
|
||||
|
||||
[Description("NEEDS_DOWNLOAD")]
|
||||
NeedsDownload,
|
||||
|
||||
[Description("REMOTE_DOWNLOADING")]
|
||||
RemoteDownloading,
|
||||
|
||||
[Description("NEEDS_UPLOAD")]
|
||||
NeedsUpload,
|
||||
|
||||
[Description("LOCAL_UPLOADING")]
|
||||
LocalUploading,
|
||||
|
||||
[Description("IN_CONFLICT")]
|
||||
InConflict,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4708b605fe779fe4384e9166eb21b85c
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Oculus/Platform/Scripts/CloudStorageUpdateStatus.cs
Normal file
24
Assets/Oculus/Platform/Scripts/CloudStorageUpdateStatus.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum CloudStorageUpdateStatus : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("OK")]
|
||||
Ok,
|
||||
|
||||
[Description("BETTER_VERSION_STORED")]
|
||||
BetterVersionStored,
|
||||
|
||||
[Description("MANUAL_MERGE_REQUIRED")]
|
||||
ManualMergeRequired,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b620ce00fa534d4f8f006da66d05d35
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
45
Assets/Oculus/Platform/Scripts/Decoder.cs
Normal file
45
Assets/Oculus/Platform/Scripts/Decoder.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
//This file is deprecated. Use the high level voip system instead:
|
||||
// https://developer3.oculus.com/documentation/platform/latest/concepts/dg-core-content/#dg-cc-voip
|
||||
#if false
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System;
|
||||
|
||||
namespace Oculus.Platform {
|
||||
|
||||
public class Decoder : IDisposable {
|
||||
|
||||
IntPtr dec;
|
||||
float[] decodedScratchBuffer;
|
||||
|
||||
public Decoder() {
|
||||
dec = CAPI.ovr_Voip_CreateDecoder();
|
||||
decodedScratchBuffer = new float[480 * 10];
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (dec != IntPtr.Zero)
|
||||
{
|
||||
CAPI.ovr_Voip_DestroyEncoder(dec);
|
||||
dec = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
public float[] Decode(byte[] data) {
|
||||
CAPI.ovr_VoipDecoder_Decode(dec, data, (uint)data.Length);
|
||||
|
||||
ulong gotSize = (ulong)CAPI.ovr_VoipDecoder_GetDecodedPCM(dec, decodedScratchBuffer, (UIntPtr)decodedScratchBuffer.Length);
|
||||
|
||||
if (gotSize > 0)
|
||||
{
|
||||
float[] pcm = new float[gotSize];
|
||||
Array.Copy(decodedScratchBuffer, pcm, (int)gotSize);
|
||||
return pcm;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/Oculus/Platform/Scripts/Decoder.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/Decoder.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 731601605a2facb4b8f3f211411a4693
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
45
Assets/Oculus/Platform/Scripts/Encoder.cs
Normal file
45
Assets/Oculus/Platform/Scripts/Encoder.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
//This file is deprecated. Use the high level voip system instead:
|
||||
// https://developer3.oculus.com/documentation/platform/latest/concepts/dg-core-content/#dg-cc-voip
|
||||
#if false
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System;
|
||||
|
||||
|
||||
namespace Oculus.Platform {
|
||||
|
||||
public class Encoder : IDisposable {
|
||||
IntPtr enc;
|
||||
|
||||
public Encoder() {
|
||||
enc = CAPI.ovr_Voip_CreateEncoder();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (enc != IntPtr.Zero)
|
||||
{
|
||||
CAPI.ovr_Voip_DestroyEncoder(enc);
|
||||
enc = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] Encode(float[] samples) {
|
||||
CAPI.ovr_VoipEncoder_AddPCM(enc, samples, (uint)samples.Length);
|
||||
|
||||
ulong size = (ulong)CAPI.ovr_VoipEncoder_GetCompressedDataSize(enc);
|
||||
if(size > 0) {
|
||||
byte[] compressedData = new byte[size]; //TODO 10376403 - pool this
|
||||
ulong sizeRead = (ulong)CAPI.ovr_VoipEncoder_GetCompressedData(enc, compressedData, (UIntPtr)size);
|
||||
|
||||
if (sizeRead != size)
|
||||
{
|
||||
throw new Exception("Read size differed from reported size");
|
||||
}
|
||||
return compressedData;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/Oculus/Platform/Scripts/Encoder.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/Encoder.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6ac5c6788e50aa4f9ce8e07d8605023
|
||||
timeCreated: 1523486801
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/Oculus/Platform/Scripts/IMicrophone.cs
Normal file
15
Assets/Oculus/Platform/Scripts/IMicrophone.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System;
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
public interface IMicrophone
|
||||
{
|
||||
void Start();
|
||||
|
||||
void Stop();
|
||||
|
||||
float[] Update();
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/IMicrophone.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/IMicrophone.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bd3a2d44aa26f148bb61b2735a67028
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Oculus/Platform/Scripts/IVoipPCMSource.cs
Normal file
13
Assets/Oculus/Platform/Scripts/IVoipPCMSource.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
public interface IVoipPCMSource
|
||||
{
|
||||
int GetPCM(float[] dest, int length);
|
||||
|
||||
void SetSenderID(ulong senderID);
|
||||
|
||||
void Update();
|
||||
|
||||
int PeekSizeElements();
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/IVoipPCMSource.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/IVoipPCMSource.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0dd741d18ee018045936b0f2f9c9b2f7
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Oculus/Platform/Scripts/KeyValuePairType.cs
Normal file
24
Assets/Oculus/Platform/Scripts/KeyValuePairType.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum KeyValuePairType : int
|
||||
{
|
||||
[Description("STRING")]
|
||||
String,
|
||||
|
||||
[Description("INTEGER")]
|
||||
Int,
|
||||
|
||||
[Description("DOUBLE")]
|
||||
Double,
|
||||
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/KeyValuePairType.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/KeyValuePairType.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 652351552fa9f694690760ab0f94c90a
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/Oculus/Platform/Scripts/LaunchType.cs
Normal file
27
Assets/Oculus/Platform/Scripts/LaunchType.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum LaunchType : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("NORMAL")]
|
||||
Normal,
|
||||
|
||||
[Description("INVITE")]
|
||||
Invite,
|
||||
|
||||
[Description("COORDINATED")]
|
||||
Coordinated,
|
||||
|
||||
[Description("DEEPLINK")]
|
||||
Deeplink,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/LaunchType.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/LaunchType.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19914a3b196ab06439965a325ac1da12
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Assets/Oculus/Platform/Scripts/LeaderboardFilterType.cs
Normal file
21
Assets/Oculus/Platform/Scripts/LeaderboardFilterType.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum LeaderboardFilterType : int
|
||||
{
|
||||
[Description("NONE")]
|
||||
None,
|
||||
|
||||
[Description("FRIENDS")]
|
||||
Friends,
|
||||
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/LeaderboardFilterType.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/LeaderboardFilterType.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb882419e00a3424b83ba7ff72a0d3fd
|
||||
timeCreated: 1523486800
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Oculus/Platform/Scripts/LeaderboardStartAt.cs
Normal file
24
Assets/Oculus/Platform/Scripts/LeaderboardStartAt.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum LeaderboardStartAt : int
|
||||
{
|
||||
[Description("TOP")]
|
||||
Top,
|
||||
|
||||
[Description("CENTERED_ON_VIEWER")]
|
||||
CenteredOnViewer,
|
||||
|
||||
[Description("CENTERED_ON_VIEWER_OR_TOP")]
|
||||
CenteredOnViewerOrTop,
|
||||
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/LeaderboardStartAt.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/LeaderboardStartAt.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e8523caca9803145a3e871dca67c0e5
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Oculus/Platform/Scripts/LivestreamingAudience.cs
Normal file
24
Assets/Oculus/Platform/Scripts/LivestreamingAudience.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum LivestreamingAudience : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("PUBLIC")]
|
||||
Public,
|
||||
|
||||
[Description("FRIENDS")]
|
||||
Friends,
|
||||
|
||||
[Description("ONLY_ME")]
|
||||
OnlyMe,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/LivestreamingAudience.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/LivestreamingAudience.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73f525341669b334cb7179690b1545fd
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum LivestreamingMicrophoneStatus : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("MICROPHONE_ON")]
|
||||
MicrophoneOn,
|
||||
|
||||
[Description("MICROPHONE_OFF")]
|
||||
MicrophoneOff,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 200430e18cf27164c95796b4c3456b1f
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/Oculus/Platform/Scripts/LivestreamingStartStatus.cs
Normal file
30
Assets/Oculus/Platform/Scripts/LivestreamingStartStatus.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum LivestreamingStartStatus : int
|
||||
{
|
||||
[Description("SUCCESS")]
|
||||
Success = 1,
|
||||
|
||||
[Description("UNKNOWN")]
|
||||
Unknown = 0,
|
||||
|
||||
[Description("NO_PACKAGE_SET")]
|
||||
NoPackageSet = -1,
|
||||
|
||||
[Description("NO_FB_CONNECT")]
|
||||
NoFbConnect = -2,
|
||||
|
||||
[Description("NO_SESSION_ID")]
|
||||
NoSessionId = -3,
|
||||
|
||||
[Description("MISSING_PARAMETERS")]
|
||||
MissingParameters = -4,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 278e551ec7e02bf419ea10f24a330083
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum MatchmakingCriterionImportance : int
|
||||
{
|
||||
[Description("REQUIRED")]
|
||||
Required,
|
||||
|
||||
[Description("HIGH")]
|
||||
High,
|
||||
|
||||
[Description("MEDIUM")]
|
||||
Medium,
|
||||
|
||||
[Description("LOW")]
|
||||
Low,
|
||||
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 030eb76e37b12924e96e8b450291a220
|
||||
timeCreated: 1523486796
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
77
Assets/Oculus/Platform/Scripts/MatchmakingOptions.cs
Normal file
77
Assets/Oculus/Platform/Scripts/MatchmakingOptions.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MatchmakingOptions {
|
||||
|
||||
public MatchmakingOptions() {
|
||||
Handle = CAPI.ovr_MatchmakingOptions_Create();
|
||||
}
|
||||
|
||||
public void SetCreateRoomDataStore(string key, string value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetCreateRoomDataStoreString(Handle, key, value);
|
||||
}
|
||||
|
||||
public void ClearCreateRoomDataStore() {
|
||||
CAPI.ovr_MatchmakingOptions_ClearCreateRoomDataStore(Handle);
|
||||
}
|
||||
|
||||
public void SetCreateRoomJoinPolicy(RoomJoinPolicy value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetCreateRoomJoinPolicy(Handle, value);
|
||||
}
|
||||
|
||||
public void SetCreateRoomMaxUsers(uint value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetCreateRoomMaxUsers(Handle, value);
|
||||
}
|
||||
|
||||
public void AddEnqueueAdditionalUser(UInt64 userID) {
|
||||
CAPI.ovr_MatchmakingOptions_AddEnqueueAdditionalUser(Handle, userID);
|
||||
}
|
||||
|
||||
public void ClearEnqueueAdditionalUsers() {
|
||||
CAPI.ovr_MatchmakingOptions_ClearEnqueueAdditionalUsers(Handle);
|
||||
}
|
||||
|
||||
public void SetEnqueueDataSettings(string key, int value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetEnqueueDataSettingsInt(Handle, key, value);
|
||||
}
|
||||
|
||||
public void SetEnqueueDataSettings(string key, double value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetEnqueueDataSettingsDouble(Handle, key, value);
|
||||
}
|
||||
|
||||
public void SetEnqueueDataSettings(string key, string value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetEnqueueDataSettingsString(Handle, key, value);
|
||||
}
|
||||
|
||||
public void ClearEnqueueDataSettings() {
|
||||
CAPI.ovr_MatchmakingOptions_ClearEnqueueDataSettings(Handle);
|
||||
}
|
||||
|
||||
public void SetEnqueueIsDebug(bool value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetEnqueueIsDebug(Handle, value);
|
||||
}
|
||||
|
||||
public void SetEnqueueQueryKey(string value) {
|
||||
CAPI.ovr_MatchmakingOptions_SetEnqueueQueryKey(Handle, value);
|
||||
}
|
||||
|
||||
|
||||
// For passing to native C
|
||||
public static explicit operator IntPtr(MatchmakingOptions options) {
|
||||
return options != null ? options.Handle : IntPtr.Zero;
|
||||
}
|
||||
|
||||
~MatchmakingOptions() {
|
||||
CAPI.ovr_MatchmakingOptions_Destroy(Handle);
|
||||
}
|
||||
|
||||
IntPtr Handle;
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/MatchmakingOptions.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/MatchmakingOptions.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9b3e7ffb96e6594ea296771b88d7243
|
||||
timeCreated: 1523486801
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Assets/Oculus/Platform/Scripts/MatchmakingStatApproach.cs
Normal file
21
Assets/Oculus/Platform/Scripts/MatchmakingStatApproach.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum MatchmakingStatApproach : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("TRAILING")]
|
||||
Trailing,
|
||||
|
||||
[Description("SWINGY")]
|
||||
Swingy,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03cfe1746fc38ae468f5a6a910bf0379
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
18
Assets/Oculus/Platform/Scripts/MediaContentType.cs
Normal file
18
Assets/Oculus/Platform/Scripts/MediaContentType.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
using Description = System.ComponentModel.DescriptionAttribute;
|
||||
|
||||
public enum MediaContentType : int
|
||||
{
|
||||
[Description("UNKNOWN")]
|
||||
Unknown,
|
||||
|
||||
[Description("PHOTO")]
|
||||
Photo,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/MediaContentType.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/MediaContentType.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a27c72682442f94abd98f97d87f9cad
|
||||
timeCreated: 1523486798
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1388
Assets/Oculus/Platform/Scripts/Message.cs
Normal file
1388
Assets/Oculus/Platform/Scripts/Message.cs
Normal file
File diff suppressed because it is too large
Load Diff
12
Assets/Oculus/Platform/Scripts/Message.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/Message.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09dafd74c8e70094d891a1ec896c3e95
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
62
Assets/Oculus/Platform/Scripts/MicrophoneInput.cs
Normal file
62
Assets/Oculus/Platform/Scripts/MicrophoneInput.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
//This file is deprecated. Use the high level voip system instead:
|
||||
// https://developer.oculus.com/documentation/platform/latest/concepts/dg-cc-voip/
|
||||
//
|
||||
// NOTE for android developers: The existence of UnityEngine.Microphone causes Unity to insert the
|
||||
// android.permission.RECORD_AUDIO permission into the AndroidManifest.xml generated at build time
|
||||
|
||||
#if false
|
||||
using UnityEngine;
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
|
||||
public class MicrophoneInput : IMicrophone
|
||||
{
|
||||
AudioClip microphoneClip;
|
||||
int lastMicrophoneSample;
|
||||
int micBufferSizeSamples;
|
||||
|
||||
public MicrophoneInput()
|
||||
{
|
||||
int bufferLenSeconds = 1; //minimum size unity allows
|
||||
int inputFreq = 48000; //this frequency is fixed throughout the voip system atm
|
||||
microphoneClip = Microphone.Start(null, true, bufferLenSeconds, inputFreq);
|
||||
micBufferSizeSamples = bufferLenSeconds * inputFreq;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
|
||||
public float[] Update()
|
||||
{
|
||||
int pos = Microphone.GetPosition(null);
|
||||
int copySize = 0;
|
||||
if (pos < lastMicrophoneSample)
|
||||
{
|
||||
int endOfBufferSize = micBufferSizeSamples - lastMicrophoneSample;
|
||||
copySize = endOfBufferSize + pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
copySize = pos - lastMicrophoneSample;
|
||||
}
|
||||
|
||||
if (copySize == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
float[] samples = new float[copySize]; //TODO 10376403 - pool this
|
||||
microphoneClip.GetData(samples, lastMicrophoneSample);
|
||||
lastMicrophoneSample = pos;
|
||||
return samples;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/Oculus/Platform/Scripts/MicrophoneInput.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/MicrophoneInput.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2775d34a6e394754e897a9af26acdef3
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
50
Assets/Oculus/Platform/Scripts/MicrophoneInputNative.cs
Normal file
50
Assets/Oculus/Platform/Scripts/MicrophoneInputNative.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
//This file is deprecated. Use the high level voip system instead:
|
||||
// https://developer.oculus.com/documentation/platform/latest/concepts/dg-cc-voip/
|
||||
|
||||
#if false
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
namespace Oculus.Platform
|
||||
{
|
||||
public class MicrophoneInputNative : IMicrophone
|
||||
{
|
||||
IntPtr mic;
|
||||
|
||||
int tempBufferSize = 960 * 10;
|
||||
float[] tempBuffer;
|
||||
|
||||
public MicrophoneInputNative()
|
||||
{
|
||||
mic = CAPI.ovr_Microphone_Create();
|
||||
CAPI.ovr_Microphone_Start(mic);
|
||||
tempBuffer = new float[tempBufferSize];
|
||||
Debug.Log(mic);
|
||||
}
|
||||
|
||||
public float[] Update()
|
||||
{
|
||||
ulong readSize = (ulong)CAPI.ovr_Microphone_ReadData(mic, tempBuffer, (UIntPtr)tempBufferSize);
|
||||
if (readSize > 0)
|
||||
{
|
||||
|
||||
float[] outBuffer = new float[readSize];
|
||||
Array.Copy(tempBuffer, outBuffer, (int)readSize);
|
||||
return outBuffer;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
CAPI.ovr_Microphone_Stop(mic);
|
||||
CAPI.ovr_Microphone_Destroy(mic);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
12
Assets/Oculus/Platform/Scripts/MicrophoneInputNative.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/MicrophoneInputNative.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5cd1f4154602cb48a4a554d20e6d40c
|
||||
timeCreated: 1523486800
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Oculus/Platform/Scripts/Models.meta
Normal file
9
Assets/Oculus/Platform/Scripts/Models.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b26d68fa787d51b44af73c8351055681
|
||||
folderAsset: yes
|
||||
timeCreated: 1520037586
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AbuseReportRecording
|
||||
{
|
||||
public readonly string RecordingUuid;
|
||||
|
||||
|
||||
public AbuseReportRecording(IntPtr o)
|
||||
{
|
||||
RecordingUuid = CAPI.ovr_AbuseReportRecording_GetRecordingUuid(o);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c2b12af41eef9f4786416f70fc1959c
|
||||
timeCreated: 1523486797
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AchievementDefinition
|
||||
{
|
||||
public readonly AchievementType Type;
|
||||
public readonly string Name;
|
||||
public readonly uint BitfieldLength;
|
||||
public readonly ulong Target;
|
||||
|
||||
|
||||
public AchievementDefinition(IntPtr o)
|
||||
{
|
||||
Type = CAPI.ovr_AchievementDefinition_GetType(o);
|
||||
Name = CAPI.ovr_AchievementDefinition_GetName(o);
|
||||
BitfieldLength = CAPI.ovr_AchievementDefinition_GetBitfieldLength(o);
|
||||
Target = CAPI.ovr_AchievementDefinition_GetTarget(o);
|
||||
}
|
||||
}
|
||||
|
||||
public class AchievementDefinitionList : DeserializableList<AchievementDefinition> {
|
||||
public AchievementDefinitionList(IntPtr a) {
|
||||
var count = (int)CAPI.ovr_AchievementDefinitionArray_GetSize(a);
|
||||
_Data = new List<AchievementDefinition>(count);
|
||||
for (int i = 0; i < count; i++) {
|
||||
_Data.Add(new AchievementDefinition(CAPI.ovr_AchievementDefinitionArray_GetElement(a, (UIntPtr)i)));
|
||||
}
|
||||
|
||||
_NextUrl = CAPI.ovr_AchievementDefinitionArray_GetNextUrl(a);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7d2e372fad07698479f27fd72c13489e
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
42
Assets/Oculus/Platform/Scripts/Models/AchievementProgress.cs
Normal file
42
Assets/Oculus/Platform/Scripts/Models/AchievementProgress.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AchievementProgress
|
||||
{
|
||||
public readonly string Bitfield;
|
||||
public readonly ulong Count;
|
||||
public readonly bool IsUnlocked;
|
||||
public readonly string Name;
|
||||
public readonly DateTime UnlockTime;
|
||||
|
||||
|
||||
public AchievementProgress(IntPtr o)
|
||||
{
|
||||
Bitfield = CAPI.ovr_AchievementProgress_GetBitfield(o);
|
||||
Count = CAPI.ovr_AchievementProgress_GetCount(o);
|
||||
IsUnlocked = CAPI.ovr_AchievementProgress_GetIsUnlocked(o);
|
||||
Name = CAPI.ovr_AchievementProgress_GetName(o);
|
||||
UnlockTime = CAPI.ovr_AchievementProgress_GetUnlockTime(o);
|
||||
}
|
||||
}
|
||||
|
||||
public class AchievementProgressList : DeserializableList<AchievementProgress> {
|
||||
public AchievementProgressList(IntPtr a) {
|
||||
var count = (int)CAPI.ovr_AchievementProgressArray_GetSize(a);
|
||||
_Data = new List<AchievementProgress>(count);
|
||||
for (int i = 0; i < count; i++) {
|
||||
_Data.Add(new AchievementProgress(CAPI.ovr_AchievementProgressArray_GetElement(a, (UIntPtr)i)));
|
||||
}
|
||||
|
||||
_NextUrl = CAPI.ovr_AchievementProgressArray_GetNextUrl(a);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d4a4ff6827774599abd0efe12f341fa
|
||||
timeCreated: 1462489664
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/Oculus/Platform/Scripts/Models/AchievementUpdate.cs
Normal file
24
Assets/Oculus/Platform/Scripts/Models/AchievementUpdate.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AchievementUpdate
|
||||
{
|
||||
public readonly bool JustUnlocked;
|
||||
public readonly string Name;
|
||||
|
||||
|
||||
public AchievementUpdate(IntPtr o)
|
||||
{
|
||||
JustUnlocked = CAPI.ovr_AchievementUpdate_GetJustUnlocked(o);
|
||||
Name = CAPI.ovr_AchievementUpdate_GetName(o);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a49cc0ca1bcdd99409f7658b336e2d06
|
||||
timeCreated: 1523486800
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
28
Assets/Oculus/Platform/Scripts/Models/ApplicationVersion.cs
Normal file
28
Assets/Oculus/Platform/Scripts/Models/ApplicationVersion.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
namespace Oculus.Platform.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ApplicationVersion
|
||||
{
|
||||
public readonly int CurrentCode;
|
||||
public readonly string CurrentName;
|
||||
public readonly int LatestCode;
|
||||
public readonly string LatestName;
|
||||
|
||||
|
||||
public ApplicationVersion(IntPtr o)
|
||||
{
|
||||
CurrentCode = CAPI.ovr_ApplicationVersion_GetCurrentCode(o);
|
||||
CurrentName = CAPI.ovr_ApplicationVersion_GetCurrentName(o);
|
||||
LatestCode = CAPI.ovr_ApplicationVersion_GetLatestCode(o);
|
||||
LatestName = CAPI.ovr_ApplicationVersion_GetLatestName(o);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5b714bc152876d4eaa2f638d2927cd8
|
||||
timeCreated: 1523486800
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
56
Assets/Oculus/Platform/Scripts/Models/AssetDetails.cs
Normal file
56
Assets/Oculus/Platform/Scripts/Models/AssetDetails.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
|
||||
|
||||
#pragma warning disable 0618
|
||||
|
||||
namespace Oculus.Platform.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Oculus.Platform.Models;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AssetDetails
|
||||
{
|
||||
public readonly UInt64 AssetId;
|
||||
public readonly string AssetType;
|
||||
public readonly string DownloadStatus;
|
||||
public readonly string Filepath;
|
||||
public readonly string IapStatus;
|
||||
// May be null. Check before using.
|
||||
public readonly LanguagePackInfo LanguageOptional;
|
||||
[Obsolete("Deprecated in favor of LanguageOptional")]
|
||||
public readonly LanguagePackInfo Language;
|
||||
|
||||
|
||||
public AssetDetails(IntPtr o)
|
||||
{
|
||||
AssetId = CAPI.ovr_AssetDetails_GetAssetId(o);
|
||||
AssetType = CAPI.ovr_AssetDetails_GetAssetType(o);
|
||||
DownloadStatus = CAPI.ovr_AssetDetails_GetDownloadStatus(o);
|
||||
Filepath = CAPI.ovr_AssetDetails_GetFilepath(o);
|
||||
IapStatus = CAPI.ovr_AssetDetails_GetIapStatus(o);
|
||||
{
|
||||
var pointer = CAPI.ovr_AssetDetails_GetLanguage(o);
|
||||
Language = new LanguagePackInfo(pointer);
|
||||
if (pointer == IntPtr.Zero) {
|
||||
LanguageOptional = null;
|
||||
} else {
|
||||
LanguageOptional = Language;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AssetDetailsList : DeserializableList<AssetDetails> {
|
||||
public AssetDetailsList(IntPtr a) {
|
||||
var count = (int)CAPI.ovr_AssetDetailsArray_GetSize(a);
|
||||
_Data = new List<AssetDetails>(count);
|
||||
for (int i = 0; i < count; i++) {
|
||||
_Data.Add(new AssetDetails(CAPI.ovr_AssetDetailsArray_GetElement(a, (UIntPtr)i)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
12
Assets/Oculus/Platform/Scripts/Models/AssetDetails.cs.meta
Normal file
12
Assets/Oculus/Platform/Scripts/Models/AssetDetails.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77b2c21c8a5705c4f95aa9a8507a3541
|
||||
timeCreated: 1523486799
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user