/
PlayerSettingsXboxOne.bindings.cs
327 lines (270 loc) · 15.6 KB
/
PlayerSettingsXboxOne.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using UnityEngine;
using UnityEngine.Bindings;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System;
namespace UnityEditor
{
[Obsolete("The XDK Xbox One platform was removed in 2021.1", false)]
public enum XboxOneEncryptionLevel
{
None = 0,
DevkitCompatible = 1,
FullEncryption = 2
}
[Obsolete("The XDK Xbox One platform was removed in 2021.1", false)]
public enum XboxOnePackageUpdateGranularity
{
Chunk = 1,
File = 2
}
[Obsolete("The XDK Xbox One platform was removed in 2021.1", false)]
public enum XboxOneLoggingLevel
{
AllLogging = 4,
WarningsAndErrors = 2,
ErrorsOnly = 1
}
[Obsolete("Mono script compiler is no longer supported.")]
public enum ScriptCompiler
{
Mono = 0,
Roslyn = 1
}
public sealed partial class PlayerSettings
{
[Obsolete("The XDK Xbox One platform was removed in 2021.1", false)]
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
public sealed partial class XboxOne
{
[NativeProperty("XboxOneXTitleMemory", TargetType.Field)]
extern public static int XTitleMemory
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("XboxOneLoggingLevel")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static XboxOneLoggingLevel defaultLoggingLevel { get; set; }
// Xbox One product id
[NativeProperty("XboxOneProductId", false, TargetType.Function)]
extern public static string ProductId { get; set; }
// Xbox One update key required to ship updates
[NativeProperty("XboxOneUpdateKey", false, TargetType.Function)]
extern public static string UpdateKey { get; set; }
// Xbox One App Sandbox Id
[Obsolete("SandboxId is obsolete please remove")]
[NativeProperty("XboxOneSandboxId", false, TargetType.Function)]
extern public static string SandboxId { get; set; }
// Xbox One App Content Id
[NativeProperty("XboxOneContentId", false, TargetType.Function)]
extern public static string ContentId { get; set; }
// Xbox One App Title Id
[NativeProperty("XboxOneTitleId", false, TargetType.Function)]
extern public static string TitleId { get; set; }
// Xbox One App Title SCID
[NativeProperty("XboxOneSCId", false, TargetType.Function)]
extern public static string SCID { get; set; }
[NativeProperty("XboxOneEnableGPUVariability", TargetType.Field)]
extern public static bool EnableVariableGPU
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("XboxOnePresentImmediateThreshold")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static UInt32 PresentImmediateThreshold { get; set; }
[NativeProperty("XboxOneEnable7thCore")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static bool Enable7thCore { get; set; }
[NativeProperty("XboxOneDisableKinectGpuReservation")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static bool DisableKinectGpuReservation { get; set; }
[NativeProperty("XboxEnablePIXSampling")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static bool EnablePIXSampling { get; set; }
// Path of the os image shipped with this app.
[NativeProperty("XboxOneGameOsOverridePath", false, TargetType.Function)]
extern public static string GameOsOverridePath { get; set; }
// Packaging manifest used to build this app
[NativeProperty("XboxOnePackagingOverridePath", false, TargetType.Function)]
extern public static string PackagingOverridePath { get; set; }
// Encryption option used when making this package
[NativeProperty("XboxOnePackageEncryption", TargetType.Field)]
extern public static XboxOneEncryptionLevel PackagingEncryption
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
// The update granularity used when making a package.
[NativeProperty("XboxOnePackageUpdateGranularity", TargetType.Field)]
extern public static XboxOnePackageUpdateGranularity PackageUpdateGranularity
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
// Xbox One override auto generated identity name in app manifest (does not work with app manifest override).
[NativeProperty("XboxOneOverrideIdentityName", false, TargetType.Function)]
extern public static string OverrideIdentityName { get; set; }
// Xbox One override auto generated identity publisher in app manifest (does not work with app manifest override).
[NativeProperty("XboxOneOverrideIdentityPublisher", false, TargetType.Function)]
extern public static string OverrideIdentityPublisher { get; set; }
// Optional override path for app manifest.
[NativeProperty("XboxOneAppManifestOverridePath", false, TargetType.Function)]
extern public static string AppManifestOverridePath { get; set; }
// Returns true if this project represents DLC / content.
[NativeProperty("XboxOneIsContentPackage", TargetType.Field)]
extern public static bool IsContentPackage
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
// Returns true Xbox Compatibility mode should be set to max in manifest
[NativeProperty("XboxOneEnhancedXboxCompatibilityMode", TargetType.Field)]
extern public static bool EnhancedXboxCompatibilityMode
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
// Version used in AppManifest
[NativeProperty("XboxOneVersion", false, TargetType.Function)]
extern public static string Version { get; set; }
// Description used in AppManifest
[NativeProperty("XboxOneDescription", false, TargetType.Function)]
extern public static string Description { get; set; }
// *undocumented*
[NativeMethod("SetXboxOneCapability")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void SetCapability(string capability, bool value);
// *undocumented*
[NativeMethod("GetXboxOneCapability")]
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
extern public static bool GetCapability(string capability);
[NativeMethod("SetXboxOneLanguage")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void SetSupportedLanguage(string language, bool enabled);
[NativeMethod("GetXboxOneLanguage")]
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
extern public static bool GetSupportedLanguage(string language);
[NativeMethod("RemoveXboxOneSocketDefinition")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void RemoveSocketDefinition(string name);
[NativeMethod("SetXboxOneSocketDefinition")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void SetSocketDefinition(string name, string port, int protocol, int[] usages, string templateName, int sessionRequirment, int[] deviceUsages);
[NativeMethod("GetXboxOneSocketDefinition")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern private static void GetSocketDefinitionInternal(string name, out string port, out int protocol, [Out] int[] usages, out string templateName, out int sessionRequirment, [Out] int[] deviceUsages);
public static void GetSocketDefinition(string name, out string port, out int protocol, out int[] usages, out string templateName, out int sessionRequirment, out int[] deviceUsages)
{
int numUsages = GetXboxOneSocketDefinitionNumUsages(name);
int numDeviceUsages = GetXboxOneSocketDefinitionNumDeviceUsages(name);
if (numUsages < 0 || numDeviceUsages < 0)
throw new ArgumentException("Could not find socket definition " + name + ".");
usages = new int[numUsages];
deviceUsages = new int[numDeviceUsages];
GetSocketDefinitionInternal(name, out port, out protocol, usages, out templateName, out sessionRequirment, deviceUsages);
}
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static string[] SocketNames
{
[NativeMethod("GetXboxOneSocketNames")]
get;
}
[NativeMethod("GetXboxOneSocketDefinitionNumUsages")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern private static int GetXboxOneSocketDefinitionNumUsages(string name);
[NativeMethod("GetXboxOneSocketDefinitionNumDeviceUsages")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern private static int GetXboxOneSocketDefinitionNumDeviceUsages(string name);
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static string[] AllowedProductIds
{
[NativeMethod("GetXboxOneAllowedProductIds")]
get;
}
[NativeMethod("RemoveXboxOneAllowedProductId")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void RemoveAllowedProductId(string id);
[NativeMethod("AddXboxOneAllowedProductId")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static bool AddAllowedProductId(string id);
[NativeMethod("UpdateXboxOneAllowedProductId")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void UpdateAllowedProductId(int idx, string id);
// *undocumented*
[Obsolete("Starting May 11th 2020 any new base game submission releasing digital only, " +
"digital and disc, or disc only, should not include a ratings element in the " +
"AppxManifest. This ratings policy update applies to all Xbox supported ratings. " +
"New base submissions that come in on or after this date will be " +
"rejected by your Microsoft Representative if a ratings element is present.", false)]
[NativeMethod("SetXboxOneGameRating")]
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
extern public static void SetGameRating(string name, int value);
// *undocumented*
[Obsolete("Starting May 11th 2020 any new base game submission releasing digital only, " +
"digital and disc, or disc only, should not include a ratings element in the " +
"AppxManifest. This ratings policy update applies to all Xbox supported ratings. " +
"New base submissions that come in on or after this date will be " +
"rejected by your Microsoft Representative if a ratings element is present.", false)]
[NativeMethod("GetXboxOneGameRating")]
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
extern public static int GetGameRating(string name);
// The presence of any other value than 0 for this property will result in a PLS reservation in your app manifest.
public static uint PersistentLocalStorageSize
{
get { return persistentLocalStorageSizeInternal; }
set
{
if (value < 256 || value >= 4096)
throw new ArgumentException(string.Format("PersistentLocalStorageSize must be between 256 and 4096, but was {0}", value));
persistentLocalStorageSizeInternal = value;
}
}
[NativeProperty("XboxOnePersistentLocalStorageSize", TargetType.Field)]
extern private static uint persistentLocalStorageSizeInternal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
// Enable/Disable Type Optimization in C++ Compiler 'Master' build, applies to LTCG.
[NativeProperty("XboxOneEnableTypeOptimization")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static bool EnableTypeOptimization { get; set; }
// Whether we have enabled mono trace logs on xboxOne for debugging purposes.
[NativeProperty("XboxOneMonoLoggingLevel")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern public static int monoLoggingLevel { get; set; }
// Compiler to use for user script
[Obsolete("Mono script compiler is no longer supported.")]
public static ScriptCompiler scriptCompiler
{
get
{
return ScriptCompiler.Roslyn;
}
set
{
}
}
}
}
}