post update melancholy

This commit is contained in:
spatialfree 2020-12-07 01:58:47 -08:00
parent 213d7ec0e9
commit 0bce0d1599
806 changed files with 2374 additions and 150075 deletions

54
.vscode/launch.json vendored
View file

@ -1,54 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Unity Editor",
"type": "unity",
"path": "/c:/dofdev/SnakeInABox/Library/EditorInstance.json",
"request": "launch"
},
{
"name": "Windows Player",
"type": "unity",
"request": "launch"
},
{
"name": "OSX Player",
"type": "unity",
"request": "launch"
},
{
"name": "Linux Player",
"type": "unity",
"request": "launch"
},
{
"name": "iOS Player",
"type": "unity",
"request": "launch"
},
{
"name": "Android Player",
"type": "unity",
"request": "launch"
},
{
"name": "Xbox One Player",
"type": "unity",
"request": "launch"
},
{
"name": "PS4 Player",
"type": "unity",
"request": "launch"
},
{
"name": "SwitchPlayer",
"type": "unity",
"request": "launch"
}
]
}

View file

@ -1,4 +1,4 @@
{
{
"files.exclude":
{
"**/.DS_Store":true,

Binary file not shown.

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 7823259b9d149ac4a9f207b7b99fba2c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 70af2106b4c98bb458130d6ece67e538
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,45 +0,0 @@
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;
}
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 19bb2c637ba6e9c459e3db36b2ec10c3
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,448 +0,0 @@
namespace Oculus.Platform
{
using System;
using System.IO;
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;
// 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 UnityWebRequest getAccessTokenRequest;
private void OnEnable()
{
isUnityEditorSettingsExpanded = true;
isBuildSettingsExpanded = true;
}
[UnityEditor.MenuItem("Oculus/Platform/Edit Settings")]
public static void Edit()
{
UnityEditor.Selection.activeObject = PlatformSettings.Instance;
}
public override void OnInspectorGUI()
{
//
// Application IDs section
//
EditorGUILayout.LabelField("Application ID:");
GUIContent riftAppIDLabel = new GUIContent("Oculus Rift [?]", "This AppID will be used when building to the Windows target.");
GUIContent mobileAppIDLabel = new GUIContent("Oculus Go/Quest or Gear VR [?]", "This AppID will be used when building to the Android target");
PlatformSettings.AppID = MakeTextBox(riftAppIDLabel, PlatformSettings.AppID);
PlatformSettings.MobileAppID = MakeTextBox(mobileAppIDLabel, 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 Oculus Go/Quest or 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();
form.AddField("email", StandalonePlatformSettings.OculusPlatformTestUserEmail);
form.AddField("password", StandalonePlatformSettings.OculusPlatformTestUserPassword);
// Start the WWW request to get the access token
getAccessTokenRequest = UnityWebRequest.Post("https://graph.oculus.com/login", form);
getAccessTokenRequest.SetRequestHeader("Authorization", "Bearer OC|1141595335965881|");
getAccessTokenRequest.SendWebRequest();
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
bool canEnableARM64Support = false;
#if UNITY_2018_1_OR_NEWER
canEnableARM64Support = true;
#endif
if (!canEnableARM64Support)
{
EditorGUILayout.HelpBox("ARM64 support requires Unity 2018.1.x or higher.", MessageType.Info);
if (PlatformSettings.EnableARM64Support)
{
PlatformSettings.EnableARM64Support = false;
DisablePluginPlatform(PluginPlatform.Android64);
}
}
GUI.enabled = canEnableARM64Support;
var enableARM64Label = "Enable ARM64 Support [?]";
var enableARM64Hint = "[Experimental] If this is checked, Oculus Platform SDK support for ARM64 mobile devices will be enabled."
+ " Support for ARM64 must also be correctly configured in the Unity Player Settings to use this feature. Requires Unity 2018.1.x or higher.";
bool prevEnableARM64Support = PlatformSettings.EnableARM64Support;
PlatformSettings.EnableARM64Support =
MakeToggle(new GUIContent(enableARM64Label, enableARM64Hint), PlatformSettings.EnableARM64Support);
if (prevEnableARM64Support != PlatformSettings.EnableARM64Support)
{
if (PlatformSettings.EnableARM64Support)
{
EnablePluginPlatform(PluginPlatform.Android64);
}
else
{
DisablePluginPlatform(PluginPlatform.Android64);
}
}
GUI.enabled = true;
});
}
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.downloadHandler.text);
StandalonePlatformSettings.OculusPlatformTestUserAccessToken = Response.access_token;
}
GUI.changed = true;
EditorApplication.update -= GetAccessToken;
getAccessTokenRequest.Dispose();
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;
}
}
// TODO: Merge this with core utilities plugin updater functionality. Piggybacking here to avoid an orphaned delete in the future.
private const string PluginSubPathAndroid32 = @"/Plugins/Android32/libovrplatformloader.so";
private const string PluginSubPathAndroid64 = @"/Plugins/Android64/libovrplatformloader.so";
private const string PluginDisabledSuffix = @".disabled";
public enum PluginPlatform
{
Android32,
Android64
}
private static string GetCurrentProjectPath()
{
return Directory.GetParent(UnityEngine.Application.dataPath).FullName;
}
private static string GetPlatformRootPath()
{
// use the path to OculusPluginUpdaterStub as a relative path anchor point
var so = ScriptableObject.CreateInstance(typeof(OculusPluginUpdaterStub));
var script = MonoScript.FromScriptableObject(so);
string assetPath = AssetDatabase.GetAssetPath(script);
string editorDir = Directory.GetParent(assetPath).FullName;
string platformDir = Directory.GetParent(editorDir).FullName;
return platformDir;
}
private static string GetPlatformPluginPath(PluginPlatform platform)
{
string path = GetPlatformRootPath();
switch (platform)
{
case PluginPlatform.Android32:
path += PluginSubPathAndroid32;
break;
case PluginPlatform.Android64:
path += PluginSubPathAndroid64;
break;
default:
throw new ArgumentException("Attempted to enable platform support for unsupported platform: " + platform);
}
return path;
}
//[UnityEditor.MenuItem("Oculus/Platform/EnforcePluginPlatformSettings")]
public static void EnforcePluginPlatformSettings()
{
EnforcePluginPlatformSettings(PluginPlatform.Android32);
EnforcePluginPlatformSettings(PluginPlatform.Android64);
}
public static void EnforcePluginPlatformSettings(PluginPlatform platform)
{
string path = GetPlatformPluginPath(platform);
if (!Directory.Exists(path) && !File.Exists(path))
{
path += PluginDisabledSuffix;
}
if ((Directory.Exists(path)) || (File.Exists(path)))
{
string basePath = GetCurrentProjectPath();
string relPath = path.Substring(basePath.Length + 1);
PluginImporter pi = PluginImporter.GetAtPath(relPath) as PluginImporter;
if (pi == null)
{
return;
}
// Disable support for all platforms, then conditionally enable desired support below
pi.SetCompatibleWithEditor(false);
pi.SetCompatibleWithAnyPlatform(false);
pi.SetCompatibleWithPlatform(BuildTarget.Android, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneWindows64, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneLinux, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneLinux64, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneLinuxUniversal, false);
#if UNITY_2017_3_OR_NEWER
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSX, false);
#else
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXUniversal, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel, false);
pi.SetCompatibleWithPlatform(BuildTarget.StandaloneOSXIntel64, false);
#endif
switch (platform)
{
case PluginPlatform.Android32:
pi.SetCompatibleWithPlatform(BuildTarget.Android, true);
pi.SetPlatformData(BuildTarget.Android, "CPU", "ARMv7");
break;
case PluginPlatform.Android64:
pi.SetCompatibleWithPlatform(BuildTarget.Android, true);
pi.SetPlatformData(BuildTarget.Android, "CPU", "ARM64");
break;
default:
throw new ArgumentException("Attempted to enable platform support for unsupported platform: " + platform);
}
AssetDatabase.ImportAsset(relPath, ImportAssetOptions.ForceUpdate);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
AssetDatabase.SaveAssets();
}
}
public static void EnablePluginPlatform(PluginPlatform platform)
{
string path = GetPlatformPluginPath(platform);
string disabledPath = path + PluginDisabledSuffix;
bool pathAlreadyExists = Directory.Exists(path) || File.Exists(path);
bool disabledPathDoesNotExist = !Directory.Exists(disabledPath) && !File.Exists(disabledPath);
if (pathAlreadyExists || disabledPathDoesNotExist)
{
return;
}
string basePath = GetCurrentProjectPath();
string relPath = path.Substring(basePath.Length + 1);
string relDisabledPath = relPath + PluginDisabledSuffix;
AssetDatabase.MoveAsset(relDisabledPath, relPath);
AssetDatabase.ImportAsset(relPath, ImportAssetOptions.ForceUpdate);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
AssetDatabase.SaveAssets();
// Force reserialization of platform settings meta data
EnforcePluginPlatformSettings(platform);
}
public static void DisablePluginPlatform(PluginPlatform platform)
{
string path = GetPlatformPluginPath(platform);
string disabledPath = path + PluginDisabledSuffix;
bool pathDoesNotExist = !Directory.Exists(path) && !File.Exists(path);
bool disabledPathAlreadyExists = Directory.Exists(disabledPath) || File.Exists(disabledPath);
if (pathDoesNotExist || disabledPathAlreadyExists)
{
return;
}
string basePath = GetCurrentProjectPath();
string relPath = path.Substring(basePath.Length + 1);
string relDisabledPath = relPath + PluginDisabledSuffix;
AssetDatabase.MoveAsset(relPath, relDisabledPath);
AssetDatabase.ImportAsset(relDisabledPath, ImportAssetOptions.ForceUpdate);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
AssetDatabase.SaveAssets();
}
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 03780432f190e734dba71a2337880cdb
timeCreated: 1523486796
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,30 +0,0 @@
/************************************************************************************
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
https://developer.oculus.com/licenses/sdk-3.4.1
Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
************************************************************************************/
using UnityEngine;
using System.Collections;
public class OculusPluginUpdaterStub : ScriptableObject
{
// Stub helper class to locate script paths through Unity Editor API.
// Required to be a standalone class in a separate file or else MonoScript.FromScriptableObject() returns an empty string path.
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: af1b0142a3500574289a5ff8ae25dfa4
timeCreated: 1543975087
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,10 +0,0 @@
namespace Oculus.Platform
{
using System;
[Serializable]
public sealed class OculusStandalonePlatformResponse
{
public string access_token;
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 81f0418e197774a4e8d643b56923cb90
timeCreated: 1523486799
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 69950baa739c75843a10007fa5625eac
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,30 +0,0 @@
fileFormatVersion: 2
guid: 76a47dbf28c19ae419ef7f6a737d7e11
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 95e48a14a951b5f48aa93eab4eed9f2d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,30 +0,0 @@
fileFormatVersion: 2
guid: 087b08fabbac0d549be78c67f8befad8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 0eb5cc2ba6d8d254eb8201a73dc930c6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,40 +0,0 @@
fileFormatVersion: 2
guid: e74724ce19f5ffc439420e22a7aef8dc
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': OSXIntel
second:
enabled: 1
settings: {}
- first:
'': OSXIntel64
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 8e978d105528f9c4ab9ca31d469121d4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 52bc96c3d8ec31242aa4556ba42e5c3f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 64fc4c4c4ebbc4742ba349955706a4a0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: f8f7efcbc88c05b45944fe8d19d7b18b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: c451ff230c2c9254890a73df1d2f06db
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 10a2ad3c44e535d40a80e431a20f8e4e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: dd6a4dff43722584894a07fb076aa99b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 0f15a5d6dad76db4186ddb585521f379
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 5a94950e99c1f0644a62dc5001f7627d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,128 +0,0 @@
<?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>
JKNLD2GjErCVA+jyjwiOflKeNFE=
</data>
</dict>
<key>files2</key>
<dict>
<key>Resources/darwin-x86_64/liboculus_p2p.dylib</key>
<dict>
<key>hash2</key>
<data>
0Dix3PTkS51fqcK03xNszglO51JTVoPTad1LpFlSEzA=
</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>

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 71b8ea6ed9654514fb5a00867f5b157a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cc8f6ea6b1886014095378af0d84243e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,37 +0,0 @@
// 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;
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 0645da8344fc475469d13a6494437f8e
timeCreated: 1533910660
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,21 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: c69cf9c4f527f9e4a8dc49125afacc7b
timeCreated: 1533910663
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,24 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 42d96355ad5dd4b4eab18452dbd62fa7
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,35 +0,0 @@
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
}
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 7293b4a3c3806ad448e3b421baf984b1
timeCreated: 1523486799
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
// 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;
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: d089d8a70f920a5469fca1917d5e5122
timeCreated: 1523486800
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,126 +0,0 @@
//#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);
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: f6d1f538558efdb42ae724d9bb36e538
timeCreated: 1523486801
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 34df728904a3e304b84b2facc7fac233
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,165 +0,0 @@
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 Adding and running request handlers
internal static void AddRequest(Request request) {
requestIDsToRequests[request.RequestID] = request;
}
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);
}
}
internal static void OnApplicationQuit()
{
// Clear out all outstanding callbacks
requestIDsToRequests.Clear();
notificationCallbacks.Clear();
}
#endregion
#region Callback Internals
private static Dictionary<ulong, Request> requestIDsToRequests = new Dictionary<ulong, Request>();
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());
}
}
}
}
internal static void HandleMessage(Message msg)
{
Request request;
if (requestIDsToRequests.TryGetValue(msg.RequestID, out request)) {
try {
request.HandleMessage(msg);
} finally {
requestIDsToRequests.Remove(msg.RequestID);
}
return;
}
RequestCallback callbackHolder;
if (notificationCallbacks.TryGetValue(msg.Type, out callbackHolder))
{
callbackHolder.HandleMessage(msg);
}
}
#endregion
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 41d3953e2b7bcb44d91f97e274f9f64d
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,43 +0,0 @@
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
}
void OnApplicationQuit()
{
Callback.OnApplicationQuit();
}
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: f2caa5c6ad39b6742a7ddc2c273976c7
timeCreated: 1523486801
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,33 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 4708b605fe779fe4384e9166eb21b85c
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,24 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 2b620ce00fa534d4f8f006da66d05d35
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,45 +0,0 @@
//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

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 731601605a2facb4b8f3f211411a4693
timeCreated: 1523486799
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,45 +0,0 @@
//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

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: f6ac5c6788e50aa4f9ce8e07d8605023
timeCreated: 1523486801
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,15 +0,0 @@
using UnityEngine;
using System.Collections;
using System;
namespace Oculus.Platform
{
public interface IMicrophone
{
void Start();
void Stop();
float[] Update();
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 3bd3a2d44aa26f148bb61b2735a67028
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,13 +0,0 @@
namespace Oculus.Platform
{
public interface IVoipPCMSource
{
int GetPCM(float[] dest, int length);
void SetSenderID(ulong senderID);
void Update();
int PeekSizeElements();
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 0dd741d18ee018045936b0f2f9c9b2f7
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,24 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 652351552fa9f694690760ab0f94c90a
timeCreated: 1523486799
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 19914a3b196ab06439965a325ac1da12
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,21 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: cb882419e00a3424b83ba7ff72a0d3fd
timeCreated: 1523486800
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,24 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 8e8523caca9803145a3e871dca67c0e5
timeCreated: 1523486799
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,24 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 73f525341669b334cb7179690b1545fd
timeCreated: 1523486799
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,21 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 200430e18cf27164c95796b4c3456b1f
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,30 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 278e551ec7e02bf419ea10f24a330083
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,27 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 030eb76e37b12924e96e8b450291a220
timeCreated: 1523486796
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,77 +0,0 @@
// 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;
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: f9b3e7ffb96e6594ea296771b88d7243
timeCreated: 1523486801
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,21 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 03cfe1746fc38ae468f5a6a910bf0379
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,18 +0,0 @@
// 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,
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 4a27c72682442f94abd98f97d87f9cad
timeCreated: 1523486798
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 09dafd74c8e70094d891a1ec896c3e95
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,73 +0,0 @@
//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 OVR_PLATFORM_USE_MICROPHONE
using UnityEngine;
using System.Collections.Generic;
namespace Oculus.Platform
{
public class MicrophoneInput : IMicrophone
{
AudioClip microphoneClip;
int lastMicrophoneSample;
int micBufferSizeSamples;
private Dictionary<int, float[]> micSampleBuffers;
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;
micSampleBuffers = new Dictionary<int, float[]>();
}
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;
if (!micSampleBuffers.TryGetValue(copySize, out samples))
{
samples = new float[copySize];
micSampleBuffers[copySize] = samples;
}
microphoneClip.GetData(samples, lastMicrophoneSample);
lastMicrophoneSample = pos;
return samples;
}
}
}
#endif

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 2775d34a6e394754e897a9af26acdef3
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,58 +0,0 @@
//This file is deprecated. Use the high level voip system instead:
// https://developer.oculus.com/documentation/platform/latest/concepts/dg-cc-voip/
#if OVR_PLATFORM_USE_MICROPHONE
using UnityEngine;
using System;
using System.Collections.Generic;
namespace Oculus.Platform
{
public class MicrophoneInputNative : IMicrophone
{
IntPtr mic;
int tempBufferSize = 960 * 10;
float[] tempBuffer;
private Dictionary<int, float[]> micSampleBuffers;
public MicrophoneInputNative()
{
mic = CAPI.ovr_Microphone_Create();
CAPI.ovr_Microphone_Start(mic);
tempBuffer = new float[tempBufferSize];
micSampleBuffers = new Dictionary<int, float[]>();
}
public float[] Update()
{
ulong readSize = (ulong)CAPI.ovr_Microphone_ReadData(mic, tempBuffer, (UIntPtr)tempBufferSize);
if (readSize > 0)
{
float[] samples;
if (!micSampleBuffers.TryGetValue((int)readSize, out samples))
{
samples = new float[readSize];
micSampleBuffers[(int)readSize] = samples;
}
Array.Copy(tempBuffer, samples, (int)readSize);
return samples;
}
return null;
}
public void Start()
{
}
public void Stop()
{
CAPI.ovr_Microphone_Stop(mic);
CAPI.ovr_Microphone_Destroy(mic);
}
}
}
#endif

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: a5cd1f4154602cb48a4a554d20e6d40c
timeCreated: 1523486800
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ab7f8fd2f5021294691bdf0172884bbf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,22 +0,0 @@
// 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);
}
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 0c2b12af41eef9f4786416f70fc1959c
timeCreated: 1523486797
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,40 +0,0 @@
// 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);
}
}
}

View file

@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 7d2e372fad07698479f27fd72c13489e
timeCreated: 1523486799
licenseType: Pro
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