clean project

This commit is contained in:
Helar Jaadla
2022-03-07 17:52:41 +02:00
parent a174b45bd2
commit cbeb10ec35
5100 changed files with 837159 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
namespace Oculus.Platform
{
using UnityEngine;
using System;
using System.Collections;
using System.Runtime.InteropServices;
public sealed class StandalonePlatform
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void UnityLogDelegate(IntPtr tag, IntPtr msg);
public Request<Models.PlatformInitialize> InitializeInEditor()
{
#if UNITY_ANDROID
if (String.IsNullOrEmpty(PlatformSettings.MobileAppID))
{
throw new UnityException("Update your App ID by selecting 'Oculus Platform' -> 'Edit Settings'");
}
var appID = PlatformSettings.MobileAppID;
#else
if (String.IsNullOrEmpty(PlatformSettings.AppID))
{
throw new UnityException("Update your App ID by selecting 'Oculus Platform' -> 'Edit Settings'");
}
var appID = PlatformSettings.AppID;
#endif
if (String.IsNullOrEmpty(StandalonePlatformSettings.OculusPlatformTestUserAccessToken))
{
throw new UnityException("Update your standalone credentials by selecting 'Oculus Platform' -> 'Edit Settings'");
}
var accessToken = StandalonePlatformSettings.OculusPlatformTestUserAccessToken;
return AsyncInitialize(UInt64.Parse(appID), accessToken);
}
public Request<Models.PlatformInitialize> AsyncInitialize(ulong appID, string accessToken)
{
CAPI.ovr_UnityResetTestPlatform();
CAPI.ovr_UnityInitGlobals(IntPtr.Zero);
return new Request<Models.PlatformInitialize>(CAPI.ovr_PlatformInitializeWithAccessToken(appID, accessToken));
}
}
}