BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / Oculus / Platform / Scripts / Models / UserAndRoom.cs

UserAndRoom.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
UserAndRoom.cs 1.2 KiB Download Raw
1// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
2
3#pragma warning disable 0618
4
5namespace Oculus.Platform.Models
6{
7 using System;
8 using System.Collections;
9 using Oculus.Platform.Models;
10 using System.Collections.Generic;
11 using UnityEngine;
12
13 public class UserAndRoom
14 {
15 // May be null. Check before using.
16 public readonly Room RoomOptional;
17 [Obsolete("Deprecated in favor of RoomOptional")]
18 public readonly Room Room;
19 public readonly User User;
20
21
22 public UserAndRoom(IntPtr o)
23 {
24 {
25 var pointer = CAPI.ovr_UserAndRoom_GetRoom(o);
26 Room = new Room(pointer);
27 if (pointer == IntPtr.Zero) {
28 RoomOptional = null;
29 } else {
30 RoomOptional = Room;
31 }
32 }
33 User = new User(CAPI.ovr_UserAndRoom_GetUser(o));
34 }
35 }
36
37 public class UserAndRoomList : DeserializableList<UserAndRoom> {
38 public UserAndRoomList(IntPtr a) {
39 var count = (int)CAPI.ovr_UserAndRoomArray_GetSize(a);
40 _Data = new List<UserAndRoom>(count);
41 for (int i = 0; i < count; i++) {
42 _Data.Add(new UserAndRoom(CAPI.ovr_UserAndRoomArray_GetElement(a, (UIntPtr)i)));
43 }
44
45 _NextUrl = CAPI.ovr_UserAndRoomArray_GetNextUrl(a);
46 }
47
48 }
49}