/
PlayerSettingsWSA.bindings.cs
418 lines (346 loc) · 15.4 KB
/
PlayerSettingsWSA.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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
// 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 UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
namespace UnityEditor
{
// 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 sealed partial class PlayerSettings : UnityEngine.Object
{
public enum WSAApplicationShowName
{
NotSet = 0,
AllLogos = 1,
NoLogos = 2,
StandardLogoOnly = 3,
WideLogoOnly = 4,
}
public enum WSADefaultTileSize
{
NotSet = 0,
Medium = 1,
Wide = 2,
}
public enum WSAApplicationForegroundText
{
//notSet = 0,
Light = 1,
Dark = 2,
}
// match these with the capabilities listed in MetroCapabilities.h
public enum WSACapability
{
EnterpriseAuthentication = 0,
InternetClient = 1,
InternetClientServer = 2,
MusicLibrary = 3,
PicturesLibrary = 4,
PrivateNetworkClientServer = 5,
RemovableStorage = 6,
SharedUserCertificates = 7,
VideosLibrary = 8,
WebCam = 9,
Proximity = 10,
Microphone = 11,
Location = 12,
HumanInterfaceDevice = 13,
AllJoyn = 14,
BlockedChatMessages = 15,
Chat = 16,
CodeGeneration = 17,
Objects3D = 18,
PhoneCall = 19,
UserAccountInformation = 20,
VoipCall = 21,
Bluetooth = 22,
SpatialPerception = 23,
InputInjectionBrokered = 24,
Appointments = 25,
BackgroundMediaPlayback = 26,
Contacts = 27,
LowLevelDevices = 28,
OfflineMapsManagement = 29,
PhoneCallHistoryPublic = 30,
PointOfService = 31,
RecordedCallsFolder = 32,
RemoteSystem = 33,
SystemManagement = 34,
UserDataTasks = 35,
UserNotificationListener = 36,
GazeInput = 37
}
// match these with the capabilities listed in MetroCapabilities.h
public enum WSATargetFamily
{
Desktop = 0,
Mobile = 1,
Xbox = 2,
Holographic = 3,
Team = 4,
IoT = 5,
IoTHeadless = 6,
}
public enum WSAImageScale
{
_100 = 100,
_125 = 125,
_150 = 150,
_200 = 200,
_400 = 400,
Target16 = 16,
Target24 = 24,
Target32 = 32,
Target48 = 48,
Target256 = 256,
[Obsolete("Image scale 80 is not used in Universal Windows Platform", false)]
_80 = 80,
[Obsolete("Image scale 140 is not used in Universal Windows Platform", false)]
_140 = 140,
[Obsolete("Image scale 180 is not used in Universal Windows Platform", false)]
_180 = 180,
[Obsolete("Image scale 240 is not used in Universal Windows Platform", false)]
_240 = 240,
}
public enum WSAImageType
{
// Generic
PackageLogo = 1,
SplashScreenImage = 2,
// Values of 11-20 used to be Windows Store 8.1 images
// Values of 21-30 used to be Windows Store 8.1 images
// UWP
UWPSquare44x44Logo = 31,
UWPSquare71x71Logo = 32,
UWPSquare150x150Logo = 33,
UWPSquare310x310Logo = 34,
UWPWide310x150Logo = 35,
}
// Keep in sync with WSAInputSource in PlayerSettings.h
public enum WSAInputSource
{
CoreWindow = 0,
IndependentInputSource = 1,
SwapChainPanel = 2,
}
[RequiredByNativeCode]
public struct WSASupportedFileType
{
public string contentType;
public string fileType;
}
public struct WSAFileTypeAssociations
{
public string name;
public WSASupportedFileType[] supportedFileTypes;
}
[NativeHeader("Editor/Mono/PlayerSettingsWSA.bindings.h")]
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[StaticAccessor("PlayerSettingsBindings::WSA", StaticAccessorType.DoubleColon)]
public sealed partial class WSA
{
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
[NativeProperty("wsaTransparentSwapchain", TargetType.Field)]
public static extern bool transparentSwapchain { get; set; }
public static extern string packageName { get; set; }
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("Use GetVisualAssetsImage()/SetVisualAssetsImage()", true)]
public static extern string packageLogo { get; set; }
private static extern string GetWSAImage(WSAImageType type, WSAImageScale scale);
private static extern void SetWSAImage(string image, WSAImageType type, WSAImageScale scale);
private static extern string packageVersionRaw { get; set; }
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("PlayerSettings.WSA.commandLineArgsFile is deprecated", error: true)]
public static string commandLineArgsFile { get { return string.Empty; } set {} }
[NativeThrows]
public static extern bool SetCertificate(string path, string password);
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("metroCertificatePath", TargetType.Field)]
public static extern string certificatePath { get; }
internal static extern string certificatePassword { get; }
private static string NullIfEmpty(string value)
{
return String.IsNullOrEmpty(value) ? null : value;
}
public static string certificateSubject
{
get { return NullIfEmpty(internalCertificateSubject); }
}
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("metroCertificateSubject", TargetType.Field)]
private static extern string internalCertificateSubject { get; }
public static string certificateIssuer
{
get { return NullIfEmpty(internalCertificateIssuer); }
}
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("metroCertificateIssuer", TargetType.Field)]
private static extern string internalCertificateIssuer { get; }
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("metroCertificateNotAfter", TargetType.Field)]
private static extern long certificateNotAfterRaw { get; }
public static extern string applicationDescription { get; set; }
public static extern string tileShortName { get; set; }
[NativeProperty("metroTileShowName", TargetType.Field)]
public static extern WSAApplicationShowName tileShowName
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroMediumTileShowName", TargetType.Field)]
public static extern bool mediumTileShowName
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroLargeTileShowName", TargetType.Field)]
public static extern bool largeTileShowName
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroWideTileShowName", TargetType.Field)]
public static extern bool wideTileShowName
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroDefaultTileSize", TargetType.Field)]
public static extern WSADefaultTileSize defaultTileSize
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroTileForegroundText", TargetType.Field)]
public static extern WSAApplicationForegroundText tileForegroundText
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroTileBackgroundColor", TargetType.Field)]
public static extern Color tileBackgroundColor
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[Obsolete("PlayerSettings.WSA.enableIndependentInputSource is deprecated. Use PlayerSettings.WSA.inputSource.", false)]
public static bool enableIndependentInputSource
{
get { return inputSource == WSAInputSource.IndependentInputSource; }
set { inputSource = value ? WSAInputSource.IndependentInputSource : WSAInputSource.CoreWindow; }
}
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
[NativeProperty("metroInputSource", TargetType.Field)]
public static extern WSAInputSource inputSource { get; set; }
[NativeProperty("metroSupportStreamingInstall", TargetType.Field)]
public static extern bool supportStreamingInstall
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroLastRequiredScene", TargetType.Field)]
public static extern int lastRequiredScene
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroSplashScreenUseBackgroundColor", TargetType.Field)]
private static extern bool splashScreenUseBackgroundColor
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("metroSplashScreenBackgroundColor", TargetType.Field)]
private static extern Color splashScreenBackgroundColorRaw
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("syncCapabilities", TargetType.Field)]
public static extern bool syncCapabilities
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
private static extern void InternalSetCapability(string name, string value);
private static extern string InternalGetCapability(string name);
private static extern void InternalSetTargetDeviceFamily(string name, string value);
private static extern string InternalGetTargetDeviceFamily(string name);
// Workaround for Case 756100 - properties (and probably functions) in nested+nested class are not correctly bound, causing MissingMethodException when calling them from C#
internal static extern string internalProtocolName { get; set; }
internal static WSAFileTypeAssociations internalFileTypeAssociations
{
get
{
return new WSAFileTypeAssociations { name = metroFTAName, supportedFileTypes = metroFTAFileTypes };
}
set
{
metroFTAName = value.name;
metroFTAFileTypes = value.supportedFileTypes;
}
}
private static extern string metroFTAName { get; set; }
[NativeProperty("metroFTAFileTypes", TargetType.Function)]
private static extern WSASupportedFileType[] metroFTAFileTypes
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
public static extern string vcxProjDefaultLanguage { get; set; }
public static class Declarations
{
public static string protocolName
{
get
{
return PlayerSettings.WSA.internalProtocolName;
}
set
{
PlayerSettings.WSA.internalProtocolName = value;
}
}
public static WSAFileTypeAssociations fileTypeAssociations
{
get
{
return PlayerSettings.WSA.internalFileTypeAssociations;
}
set
{
PlayerSettings.WSA.internalFileTypeAssociations = value;
}
}
}
}
}
}