Initialer Upload neues Unity-Projekt
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c47390a2343c62e4fbb11987a08070f3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Oculus/Platform/Samples/ReportingCallbackSample/Scenes/ReportingCallbackSample.unity
(Stored with Git LFS)
Normal file
BIN
Assets/Oculus/Platform/Samples/ReportingCallbackSample/Scenes/ReportingCallbackSample.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d4fbf53e649040b698b2ba26c1531a9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3eeb4dcd2fdb97c47bb05787ba1073e0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,66 @@
|
||||
// Uncomment this if you have the Touch controller classes in your project
|
||||
//#define USE_OVRINPUT
|
||||
|
||||
using System;
|
||||
using Oculus.Platform;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/**
|
||||
* This class shows a very simple way to integrate the Reporting Callback
|
||||
* by registering a listener and responding to the notification
|
||||
*/
|
||||
public class ReportingCallbackSample : MonoBehaviour
|
||||
{
|
||||
public Text InVRConsole;
|
||||
public Text DestinationsConsole;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
UpdateConsole("Init Oculus Platform SDK...");
|
||||
Core.AsyncInitialize().OnComplete(message => {
|
||||
if (message.IsError)
|
||||
{
|
||||
// Init failed, nothing will work
|
||||
UpdateConsole(message.GetError().Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateConsole("Init complete!");
|
||||
|
||||
/**
|
||||
* Listen for when user clicks AUI report button
|
||||
*/
|
||||
AbuseReport.SetReportButtonPressedNotificationCallback(OnReportButtonIntentNotif);
|
||||
UpdateConsole("Registered callback");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// User has interacted with the AUI outside this app
|
||||
void OnReportButtonIntentNotif(Message<string> message)
|
||||
{
|
||||
if (message.IsError)
|
||||
{
|
||||
UpdateConsole(message.GetError().Message);
|
||||
} else
|
||||
{
|
||||
UpdateConsole("Send that response is handled");
|
||||
AbuseReport.ReportRequestHandled(ReportRequestResponse.Handled);
|
||||
UpdateConsole("Response has been handled!");
|
||||
}
|
||||
}
|
||||
|
||||
#region Helper Functions
|
||||
|
||||
private void UpdateConsole(string value)
|
||||
{
|
||||
Debug.Log(value);
|
||||
|
||||
InVRConsole.text =
|
||||
"Welcome to the Sample Reporting Callback App\n\n" + value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9624dfcd1f9ea4397bc9a264da738b61
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user