/
PlayerSettingsTVOS.bindings.cs
229 lines (193 loc) · 9.56 KB
/
PlayerSettingsTVOS.bindings.cs
1
2
3
4
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using System.Collections.Generic;
using UnityEditor.Build;
using UnityEngine;
using UnityEngine.Bindings;
namespace UnityEditor
{
public enum tvOSSdkVersion
{
Device = 0,
Simulator = 1
}
[System.Obsolete("targetOSVersion is obsolete. Use targetOSVersionString instead.", false)]
public enum tvOSTargetOSVersion
{
Unknown = 0,
tvOS_9_0 = 900,
tvOS_9_1 = 901,
}
// Player Settings is where you define various parameters for the final game that you will build in Unity. Some of these values are used in the Resolution Dialog that launches when you open a standalone game.
public partial class PlayerSettings : UnityEngine.Object
{
// tvOS specific player settings
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[NativeHeader("Editor/Src/EditorUserBuildSettings.h")]
[StaticAccessor("GetPlayerSettings()")]
public partial class tvOS
{
// Sdk Version
private static extern int sdkVersionInt
{
[NativeMethod("GettvOSSdkVersion")]
get;
[NativeMethod("SettvOSSdkVersion")]
set;
}
public static tvOSSdkVersion sdkVersion
{
get { return (tvOSSdkVersion)sdkVersionInt; }
set { sdkVersionInt = (int)value; }
}
// Simulator Architectures
private extern static int simulatorSdkArchitectureInternal
{
[NativeMethod("GettvOSSimulatorArchitecture")]
get;
[NativeMethod("SettvOSSimulatorArchitecture")]
set;
}
public static AppleMobileArchitectureSimulator simulatorSdkArchitecture
{
get { return (AppleMobileArchitectureSimulator)simulatorSdkArchitectureInternal; }
set { simulatorSdkArchitectureInternal = (int)value; }
}
// tvOS bundle build number
public static string buildNumber
{
get { return PlayerSettings.GetBuildNumber(NamedBuildTarget.tvOS.TargetName); }
set { PlayerSettings.SetBuildNumber(NamedBuildTarget.tvOS.TargetName, value); }
}
[System.Obsolete("targetOSVersion is obsolete. Use targetOSVersionString instead.", false)]
public static tvOSTargetOSVersion targetOSVersion
{
get
{
string version = targetOSVersionString;
if (version == "9.0")
return tvOSTargetOSVersion.tvOS_9_0;
else if (version == "9.1")
return tvOSTargetOSVersion.tvOS_9_1;
return tvOSTargetOSVersion.Unknown;
}
set
{
string version = "";
if (value == tvOSTargetOSVersion.tvOS_9_0)
version = "9.0";
else if (value == tvOSTargetOSVersion.tvOS_9_1)
version = "9.1";
targetOSVersionString = version;
}
}
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeMethod("GettvOSMinimumVersionString")]
static extern string GetMinimumVersionString();
internal static readonly Version minimumOsVersion = new Version(GetMinimumVersionString());
public static extern string targetOSVersionString
{
[NativeMethod("GettvOSTargetOSVersion")]
get;
[NativeMethod("SettvOSTargetOSVersion")]
set;
}
[NativeProperty("tvOSSmallIconLayers", TargetType.Function)]
private static extern Texture2D[] smallIconLayers
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetSmallIconLayers() { return smallIconLayers; }
internal static void SetSmallIconLayers(Texture2D[] layers) { smallIconLayers = layers; }
[NativeProperty("tvOSSmallIconLayers2x", TargetType.Function)]
private static extern Texture2D[] smallIconLayers2x
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetSmallIconLayers2x() { return smallIconLayers2x; }
internal static void SetSmallIconLayers2x(Texture2D[] layers) { smallIconLayers2x = layers; }
[NativeProperty("tvOSLargeIconLayers", TargetType.Function)]
private static extern Texture2D[] largeIconLayers
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetLargeIconLayers() { return largeIconLayers; }
internal static void SetLargeIconLayers(Texture2D[] layers) { largeIconLayers = layers; }
[NativeProperty("tvOSLargeIconLayers2x", TargetType.Function)]
private static extern Texture2D[] largeIconLayers2x
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetLargeIconLayers2x() { return largeIconLayers2x; }
internal static void SetLargeIconLayers2x(Texture2D[] layers) { largeIconLayers2x = layers; }
[NativeProperty("tvOSTopShelfImageLayers", TargetType.Function)]
private static extern Texture2D[] topShelfImageLayers
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetTopShelfImageLayers() { return topShelfImageLayers; }
internal static void SetTopShelfImageLayers(Texture2D[] layers) { topShelfImageLayers = layers; }
[NativeProperty("tvOSTopShelfImageLayers2x", TargetType.Function)]
private static extern Texture2D[] topShelfImageLayers2x
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetTopShelfImageLayers2x() { return topShelfImageLayers2x; }
internal static void SetTopShelfImageLayers2x(Texture2D[] layers) { topShelfImageLayers2x = layers; }
[NativeProperty("tvOSTopShelfImageWideLayers", TargetType.Function)]
private static extern Texture2D[] topShelfImageWideLayers
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetTopShelfImageWideLayers() { return topShelfImageWideLayers; }
internal static void SetTopShelfImageWideLayers(Texture2D[] layers) { topShelfImageWideLayers = layers; }
[NativeProperty("tvOSTopShelfImageWideLayers2x", TargetType.Function)]
private static extern Texture2D[] topShelfImageWideLayers2x
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static Texture2D[] GetTopShelfImageWideLayers2x() { return topShelfImageWideLayers2x; }
internal static void SetTopShelfImageWideLayers2x(Texture2D[] layers) { topShelfImageWideLayers2x = layers; }
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("appleTVSplashScreen", TargetType.Field)]
internal static extern Texture2D splashScreen { get; }
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("appleTVSplashScreen2x", TargetType.Field)]
internal static extern Texture2D splashScreen2x { get; }
// AppleTV Enable extended game controller
public static extern bool requireExtendedGameController
{
[NativeMethod("GettvOSRequireExtendedGameController")]
get;
[NativeMethod("SettvOSRequireExtendedGameController")]
set;
}
}
}
}