Реклама

Реклама

Oculus Platform
Developer Guide
Version 1.10.0.0
2 | Introduction | Oculus Platform
2 | |
Copyrights and Trademarks
© 2017 Oculus VR, LLC. All Rights Reserved.
OCULUS VR, OCULUS, and RIFT are trademarks of Oculus VR, LLC. (C) Oculus VR, LLC. All rights reserved.
BLUETOOTH is a registered trademark of Bluetooth SIG, Inc. All other trademarks are the property of their
respective owners. Certain materials included in this publication are reprinted with the permission of the
copyright holder.
Oculus Platform | Contents | 3
Contents
Update Your App.................................................................................................4
Adding Oculus Platform Support to Your Project............................................................................................ 4
Making REST Requests......................................................................................................................................4
Native Rift and Gear VR Apps.......................................................................................................................... 5
Unity................................................................................................................................................................... 6
Oculus Platform Feature Tutorials....................................................................... 8
Entitlements: App Authorizations...................................................................................................................... 8
Ownership: Additional Authorizations...............................................................................................................9
User and Friends................................................................................................................................................9
Rooms.............................................................................................................................................................. 10
Coordinated App Launch (CAL)...................................................................................................................... 12
Room Invites.................................................................................................................................................... 13
Parties...............................................................................................................................................................15
Basic Matchmaking Walkthrough.................................................................................................................... 17
Advanced Matchmaking.................................................................................................................................. 21
VoIP: Voice over IP..........................................................................................................................................24
P2P................................................................................................................................................................... 26
In-App Purchases............................................................................................................................................. 28
Oculus Keys..................................................................................................................................................... 30
Leaderboards................................................................................................................................................... 31
Achievements................................................................................................................................................... 34
Cloud Storage..................................................................................................................................................36
App Groupings................................................................................................................................................ 39
4 | Update Your App | Oculus Platform
Update Your App
This section describes how to prepare your app or experience for the Oculus Platform features.
Adding Oculus Platform Support to Your Project
To add Oculus Platform support to your Visual C++ project:
1. Open the Properties page.
2. Select VC++ Directories.
3. Add the location of the SDK includes folder (InstallFolder\include) to Include Directories.
4. Add the location of the lib file (InstallFolder\Windows) to Library Directories.
5. Expand Linker and select Input.
6. Add the loader library (LibOVRPlatform32_1.lib or LibOVRPlatform64_1.lib) to Additional Dependencies.
7. Using the DLL loader instead of direct linking enables DLL signature verification and graceful detection of
the Oculus Runtime. To use the loader, drop the cpp file (InstallFolder/Windows/OVR_PlatformLoader.cpp )
into your project.
To bypass the Loader, add this define before including OVR_Platform.
#define OVRPL_DISABLED
#include <OVR_Platform.h>
Making REST Requests
Depending on the type of operation, you might use the Platform UI or API.
Although many requests are made in the UI, eventually you will be able to make most of them
programmatically. This section describes how to make REST requests.
Before you can make a request, make sure you have the credentials for your app. For more information, see
Oculus Platform Setup.
Many types of requests to the API use the following format:
[GET/POST/DELETE] https://graph.oculus.com/app_id/api
?access_token=token|app_id|app_secret
&option_1=<option-1>
&option_2=<option-2>
...
where:
• app_id—ID of the app.
• api—name of the API (e.g., "leaderboards").
• token—Request token.
• app_secret—the secret key for the app.
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/

Реклама

Подготовка на документа за печат…
0%