-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathEditorUserBuildSettings.bindings.cs
More file actions
676 lines (560 loc) · 22.7 KB
/
EditorUserBuildSettings.bindings.cs
File metadata and controls
676 lines (560 loc) · 22.7 KB
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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using Object = UnityEngine.Object;
using UnityEngine.Bindings;
using System;
using System.ComponentModel;
namespace UnityEditor
{
/// Target PS4 build platform.
///
/// SA: EditorUserBuildSettings.ps4BuildSubtarget.
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum PS4BuildSubtarget
{
/// Build package that it's hosted on the PC
/// SA: EditorUserBuildSettings.ps4BuildSubtarget.
PCHosted = 0,
/// Build a package suited for TestKit testing
/// SA: EditorUserBuildSettings.ps4BuildSubtarget.
Package = 1,
Iso = 2,
}
/// Target PS4 build Hardware Target.
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum PS4HardwareTarget
{
/// Target only Base hardware (works identically on Neo hardware)
BaseOnly = 0,
/// Obsolete. Use PS4ProAndBase instead.
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("Enum member PS4HardwareTarget.NeoAndBase has been deprecated. Use PS4HardwareTarget.ProAndBase instead (UnityUpgradable) -> ProAndBase", true)]
NeoAndBase = 1,
/// Target PS4 Pro hardware, also must work on Base hardware
ProAndBase = 1,
}
// Target Xbox build type.
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
public enum XboxBuildSubtarget
{
// Development player
Development = 0,
// Master player (submission-proof)
Master = 1,
// Debug player (for building with source code)
Debug = 2,
}
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
public enum XboxOneDeployMethod
{
// copies files to the kit
Push = 0,
// run and load files from a connected PC
[EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("Enum member XboxOneDeployMethod.Pull has been deprecated. Use XboxOneDeployMethod.RunFromPC instead (UnityUpgradable) -> RunFromPC", true)]
Pull = 1,
// PC network share loose files to the kit
RunFromPC = 2,
// Build Xbox One Package
Package = 3,
// Build Xbox One Package - if installed only install launch chunk for testing
PackageStreaming = 4,
}
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
public enum XboxOneDeployDrive
{
Default = 0,
Retail = 1,
Development = 2,
Ext1 = 3,
Ext2 = 4,
Ext3 = 5,
Ext4 = 6,
Ext5 = 7,
Ext6 = 8,
Ext7 = 9
}
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("UnityEditor.AndroidBuildSubtarget has been deprecated. Use UnityEditor.MobileTextureSubtarget instead (UnityUpgradable)", true)]
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum AndroidBuildSubtarget
{
Generic = -1,
DXT = -1,
PVRTC = -1,
ATC = -1,
ETC = -1,
ETC2 = -1,
ASTC = -1,
}
// Target texture build platform.
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
public enum MobileTextureSubtarget
{
// Don't override texture compression.
Generic = 0,
// S3 texture compression, nonspecific to DXT variant. Supported on devices running Nvidia Tegra2 platform, including Motorala Xoom, Motorola Atrix, Droid Bionic, and others.
DXT = 1,
// PowerVR texture compression. Available in devices running PowerVR SGX530/540 GPU, such as Motorola DROID series; Samsung Galaxy S, Nexus S, and Galaxy Tab; and others.
PVRTC = 2,
[System.Obsolete("UnityEditor.MobileTextureSubtarget.ATC has been deprecated. Use UnityEditor.MobileTextureSubtarget.ETC instead (UnityUpgradable) -> UnityEditor.MobileTextureSubtarget.ETC", true)]
ATC = 3,
// ETC1 texture compression (or RGBA16 for textures with alpha), supported by all devices.
ETC = 4,
// ETC2/EAC texture compression, supported by GLES 3.0 devices
ETC2 = 5,
// Adaptive Scalable Texture Compression
ASTC = 6,
}
// Fallback texture format for Android if ETC2 is selected, but not supported
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
public enum AndroidETC2Fallback
{
// 32-bit uncompressed
Quality32Bit = 0,
// 16-bit uncompressed
Quality16Bit = 1,
// 32-bit uncompressed, downscaled 2x
Quality32BitDownscaled = 2,
}
// Keep in sync with WSASubtarget in SerializationMetaFlags.h
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
public enum WSASubtarget
{
AnyDevice = 0,
PC = 1,
Mobile = 2,
HoloLens = 3
}
// *undocumented*
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum WSASDK
{
// *undocumented*
SDK80 = 0,
// *undocumented*
SDK81 = 1,
// *undocumented*
PhoneSDK81 = 2,
// *undocumented*
UniversalSDK81 = 3,
// *undocumented*
UWP = 4,
}
// *undocumented*
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum WSAUWPBuildType
{
// *undocumented*
XAML = 0,
// *undocumented*
D3D = 1,
}
// *undocumented*
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum WSABuildAndRunDeployTarget
{
/// *undocumented*
LocalMachine = 0,
/// *undocumented*
WindowsPhone = 1
}
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum WSABuildType
{
Debug = 0,
Release = 1,
Master = 2
}
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum iOSBuildType
{
Debug = 0,
Release = 1,
}
[NativeType(Header = "Runtime/Serialize/BuildTarget.h")]
internal enum Compression
{
None = 0,
Lz4 = 2,
Lz4HC = 3,
}
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum AndroidBuildSystem
{
[Obsolete("Internal build system is deprecated. Please use Gradle instead", false)]
[Description("Internal (deprecated)")]
Internal = 0,
Gradle = 1,
[System.ComponentModel.EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("ADT/eclipse project export for Android is no longer supported - please use Gradle export instead", true)]
ADT = 2,
/// *undocumented*
VisualStudio = 3,
}
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum AndroidBuildType
{
Debug = 0,
Development = 1,
Release = 2,
}
// *undocumented*
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
internal enum AppleBuildAndRunType
{
Xcode = 0,
Xcodebuild = 1,
iOSDeploy = 2,
}
[NativeType(Header = "Editor/Src/EditorUserBuildSettings.h")]
public enum AndroidMinification
{
None = 0,
Proguard = 1,
Gradle = 2,
}
// *undocumented*
[NativeType(Header = "Editor/Src/EditorOnlyPlayerSettings.h")]
internal struct SwitchShaderCompilerConfig
{
internal int glslcDebugLevel;
internal string debugInfoOutputPath;
internal bool triggerGraphicsDebuggersConfigUpdate;
}
[NativeHeader("Editor/Src/EditorUserBuildSettings.h")]
[StaticAccessor("GetEditorUserBuildSettings()", StaticAccessorType.Dot)]
public partial class EditorUserBuildSettings : Object
{
private EditorUserBuildSettings() {}
internal static extern AppleBuildAndRunType appleBuildAndRunType { get; set; }
internal static extern string appleDeviceId { get; set; }
// The currently selected build target group.
public static extern BuildTargetGroup selectedBuildTargetGroup { get; set; }
// The currently selected target for a standalone build.
public static extern BuildTarget selectedStandaloneTarget
{
[NativeMethod("GetSelectedStandaloneTarget")]
get;
[NativeMethod("SetSelectedStandaloneTargetFromBindings")]
set;
}
internal static extern BuildTarget selectedFacebookTarget
{
[NativeMethod("GetSelectedFacebookTarget")]
get;
[NativeMethod("SetSelectedFacebookTargetFromBindings")]
set;
}
internal static extern string facebookAccessToken { get; set; }
///PS4 Build Subtarget
public static extern PS4BuildSubtarget ps4BuildSubtarget
{
[NativeMethod("GetSelectedPS4BuildSubtarget")]
get;
[NativeMethod("SetSelectedPS4BuildSubtarget")]
set;
}
///PS4 Build Hardware Target
public static extern PS4HardwareTarget ps4HardwareTarget
{
[NativeMethod("GetPS4HardwareTarget")]
get;
[NativeMethod("SetPS4HardwareTarget")]
set;
}
// Are null references actively checked?
public static extern bool explicitNullChecks { get; set; }
// Are divide by zeros actively checked?
public static extern bool explicitDivideByZeroChecks { get; set; }
public static extern bool explicitArrayBoundsChecks { get; set; }
// Should we write out submission materials when building?
public static extern bool needSubmissionMaterials { get; set; }
// Should we write out compressed archives (Sony PsArc)
public static extern bool compressWithPsArc { get; set; }
// Should we force an install on the build package, even if there are validation errors
public static extern bool forceInstallation { get; set; }
// Should we move the package to the Bluray disc outer edge (larger ISO, but faster loading)
public static extern bool movePackageToDiscOuterEdge { get; set; }
// Should we compress files added to the package file
public static extern bool compressFilesInPackage { get; set; }
// Headless Mode
public static extern bool enableHeadlessMode { get; set; }
// Scripts only build
public static extern bool buildScriptsOnly { get; set; }
//XboxOne Build subtarget
public static extern XboxBuildSubtarget xboxBuildSubtarget
{
[NativeMethod("GetSelectedXboxBuildSubtarget")]
get;
[NativeMethod("SetSelectedXboxBuildSubtarget")]
set;
}
// 0..X levels are all considered part of the launch set of streaming install chunks
public static extern int streamingInstallLaunchRange { get; set; }
//selected Xbox One Deploy Method
public static extern XboxOneDeployMethod xboxOneDeployMethod
{
[NativeMethod("GetSelectedXboxOneDeployMethod")]
get;
[NativeMethod("SetSelectedXboxOneDeployMethod")]
set;
}
//selected Xbox One Deployment Drive
public static extern XboxOneDeployDrive xboxOneDeployDrive
{
[NativeMethod("GetSelectedXboxOneDeployDrive")]
get;
[NativeMethod("SetSelectedXboxOneDeployDrive")]
set;
}
public static extern string xboxOneUsername { get; set; }
public static extern string xboxOneNetworkSharePath { get; set; }
// Transitive property used when adding debug ports to the
// manifest for our test systems. This is required to
// allow the XboxOne to open the required ports in its
// manifest.
public static string xboxOneAdditionalDebugPorts { get; set; }
public static bool xboxOneRebootIfDeployFailsAndRetry { get; set; }
// Android platform options.
public static extern MobileTextureSubtarget androidBuildSubtarget
{
[NativeMethod("GetSelectedAndroidBuildSubtarget")]
get;
[NativeMethod("SetSelectedAndroidBuildSubtarget")]
set;
}
//Compression set/get methods for the map containing type for BuildTargetGroup
internal static Compression GetCompressionType(BuildTargetGroup targetGroup)
{
return (Compression)GetCompressionTypeInternal(targetGroup);
}
[NativeMethod("GetSelectedCompressionType")]
private static extern int GetCompressionTypeInternal(BuildTargetGroup targetGroup);
internal static void SetCompressionType(BuildTargetGroup targetGroup, Compression type)
{
SetCompressionTypeInternal(targetGroup, (int)type);
}
[NativeMethod("SetSelectedCompressionType")]
private static extern void SetCompressionTypeInternal(BuildTargetGroup targetGroup, int type);
public static extern AndroidETC2Fallback androidETC2Fallback
{
[NativeMethod("GetSelectedAndroidETC2Fallback")]
get;
[NativeMethod("SetSelectedAndroidETC2Fallback")]
set;
}
public static extern AndroidBuildSystem androidBuildSystem { get; set; }
public static extern AndroidBuildType androidBuildType { get; set; }
public static extern AndroidMinification androidDebugMinification { get; set; }
public static extern AndroidMinification androidReleaseMinification { get; set; }
public static extern bool androidUseLegacySdkTools { get; set; }
// *undocumented*
// NOTE: This setting should probably not be a part of the public API as is. Atm it is used by playmode tests
// and applied during build post-processing. We will however move towards separating building and launching
// which makes it unclear when connections should be attempted. In the future, the DeploymentTargets
// API will most likely support connecting to named external devices, which might make this setting obsolete.
internal static extern string androidDeviceSocketAddress { get; set; }
internal static extern string androidCurrentDeploymentTargetId { get; set; }
public static extern WSASubtarget wsaSubtarget
{
[NativeMethod("GetSelectedWSABuildSubtarget")]
get;
[NativeMethod("SetSelectedWSABuildSubtarget")]
set;
}
[Obsolete("EditorUserBuildSettings.wsaSDK is obsolete and has no effect.It will be removed in a subsequent Unity release.")]
public static extern WSASDK wsaSDK
{
[NativeMethod("GetSelectedWSASDK")]
get;
[NativeMethod("SetSelectedWSASDK")]
set;
}
// *undocumented*
public static extern WSAUWPBuildType wsaUWPBuildType
{
[NativeMethod("GetSelectedWSAUWPBuildType")]
get;
[NativeMethod("SetSelectedWSAUWPBuildType")]
set;
}
public static extern string wsaUWPSDK
{
[NativeMethod("GetSelectedWSAUWPSDK")]
get;
[NativeMethod("SetSelectedWSAUWPSDK")]
set;
}
public static extern string wsaMinUWPSDK
{
[NativeMethod("GetSelectedWSAMinUWPSDK")]
get;
[NativeMethod("SetSelectedWSAMinUWPSDK")]
set;
}
public static extern string wsaArchitecture
{
[NativeMethod("GetSelectedWSAArchitecture")]
get;
[NativeMethod("SetSelectedWSAArchitecture")]
set;
}
public static extern string wsaUWPVisualStudioVersion
{
[NativeMethod("GetSelectedWSAUWPVSVersion")]
get;
[NativeMethod("SetSelectedWSAUWPVSVersion")]
set;
}
// *undocumented*
public static extern WSABuildAndRunDeployTarget wsaBuildAndRunDeployTarget
{
[NativeMethod("GetSelectedWSABuildAndRunDeployTarget")]
get;
[NativeMethod("SetSelectedWSABuildAndRunDeployTarget")]
set;
}
// *undocumented*
public static extern bool wsaGenerateReferenceProjects
{
[NativeMethod("GetGenerateWSAReferenceProjects")]
get;
[NativeMethod("SetGenerateWSAReferenceProjects")]
set;
}
public static extern void SetWSADotNetNative(WSABuildType config, bool enabled);
public static extern bool GetWSADotNetNative(WSABuildType config);
// The currently active build target.
public static extern BuildTarget activeBuildTarget { get; }
// The currently active build target.
internal static extern BuildTargetGroup activeBuildTargetGroup { get; }
[NativeMethod("SwitchActiveBuildTargetSync")]
public static extern bool SwitchActiveBuildTarget(BuildTargetGroup targetGroup, BuildTarget target);
[NativeMethod("SwitchActiveBuildTargetAsync")]
public static extern bool SwitchActiveBuildTargetAsync(BuildTargetGroup targetGroup, BuildTarget target);
// DEFINE directives for the compiler.
public static extern string[] activeScriptCompilationDefines
{
[NativeMethod("GetActiveScriptCompilationDefinesBindingMethod")]
get;
}
// Get the current location for the build.
public static extern string GetBuildLocation(BuildTarget target);
// Set a new location for the build.
public static extern void SetBuildLocation(BuildTarget target, string location);
public static void SetPlatformSettings(string platformName, string name, string value)
{
string buildTargetGroup = BuildPipeline.GetBuildTargetGroupName(BuildPipeline.GetBuildTargetByName(platformName));
SetPlatformSettings(buildTargetGroup, platformName, name, value);
}
public static extern void SetPlatformSettings(string buildTargetGroup, string buildTarget, string name, string value);
public static string GetPlatformSettings(string platformName, string name)
{
string buildTargetGroup = BuildPipeline.GetBuildTargetGroupName(BuildPipeline.GetBuildTargetByName(platformName));
return GetPlatformSettings(buildTargetGroup, platformName, name);
}
public static extern string GetPlatformSettings(string buildTargetGroup, string platformName, string name);
// Enables a development build.
public static extern bool development { get; set; }
// Enables a development build with no assets bundled.
internal static extern bool datalessPlayer { get; set; }
// Use prebuilt UnityNative asm.js module
public static extern bool webGLUsePreBuiltUnityEngine { get; set; }
// Start the player with a connection to the profiler.
public static extern bool connectProfiler { get; set; }
// Start the player with Emulation mode enabled and set to RemoteDevice
public static extern bool wsaHolographicRemoting { get; set; }
// Enable source-level debuggers to connect.
public static extern bool allowDebugging { get; set; }
// Export as Android Google Project instead of building it
public static extern bool exportAsGoogleAndroidProject { get; set; }
// Build Google Play App Bundle
public static extern bool buildAppBundle { get; set; }
// Symlink runtime libraries with an iOS Xcode project.
public static extern bool symlinkLibraries { get; set; }
// Symlink trampoline for iOS Xcode project.
internal static extern bool symlinkTrampoline { get; set; }
public static extern iOSBuildType iOSBuildConfigType
{
[NativeMethod("GetIOSBuildType")]
get;
[NativeMethod("SetIOSBuildType")]
set;
}
// Instead of creating a ROM file, create a buildable Visual Studio 2015 solution.
public static extern bool switchCreateSolutionFile
{
[NativeMethod("GetCreateSolutionFileForSwitch")]
get;
[NativeMethod("SetCreateSolutionFileForSwitch")]
set;
}
// Create a .nsp ROM file out of the loose-files .nspd folder
public static extern bool switchCreateRomFile
{
[NativeMethod("GetCreateRomFileForSwitch")]
get;
[NativeMethod("SetCreateRomFileForSwitch")]
set;
}
// Enable linkage of NVN Graphics Debugger for Nintendo Switch.
public static extern bool switchNVNGraphicsDebugger
{
[NativeMethod("GetNVNGraphicsDebuggerForSwitch")]
get;
[NativeMethod("SetNVNGraphicsDebuggerForSwitch")]
set;
}
// Enable shader debugging using NVN Graphics Debugger
public static extern bool switchNVNShaderDebugging
{
[NativeMethod("GetNVNShaderDebugging")]
get;
[NativeMethod("SetNVNShaderDebugging")]
set;
}
// Enable debug validation of NVN drawcalls
public static extern bool switchNVNDrawValidation
{
[NativeMethod("GetNVNDrawValidation")]
get;
[NativeMethod("SetNVNDrawValidation")]
set;
}
// Enable linkage of the Heap inspector tool for Nintendo Switch.
public static extern bool switchEnableHeapInspector
{
[NativeMethod("GetEnableHeapInspectorForSwitch")]
get;
[NativeMethod("SetEnableHeapInspectorForSwitch")]
set;
}
// Enable linkage of DebugPad functionality for Nintendo Switch.
public static extern bool switchEnableDebugPad
{
[NativeMethod("GetEnableDebugPadForSwitch")]
get;
[NativeMethod("SetEnableDebugPadForSwitch")]
set;
}
// Redirect attempts to write to "rom:" mount, to "host:" mount for Nintendo Switch (for debugging and tests only)
public static extern bool switchRedirectWritesToHostMount
{
[NativeMethod("GetRedirectWritesToHostMountForSwitch")]
get;
[NativeMethod("SetRedirectWritesToHostMountForSwitch")]
set;
}
internal static extern SwitchShaderCompilerConfig switchShaderCompilerConfig
{
[NativeMethod("GetSwitchShaderCompilerConfig")]
get;
[NativeMethod("SetSwitchShaderCompilerConfig")]
set;
}
// Place the built player in the build folder.
public static extern bool installInBuildFolder { get; set; }
}
}