/
PlayerSettings.bindings.cs
1773 lines (1390 loc) · 78.8 KB
/
PlayerSettings.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
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
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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 System.ComponentModel;
using System.Linq;
using System.Text;
using UnityEditor.Build;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEditor.Modules;
namespace UnityEditor
{
// Resolution dialog setting
[Obsolete("The Display Resolution Dialog has been removed.", false)]
public enum ResolutionDialogSetting
{
// Never show the resolutions dialog.
Disabled = 0,
// Show the resolutions dialog on first launch.
Enabled = 1,
// Hide the resolutions dialog on first launch.
HiddenByDefault = 2,
}
public enum ScriptingImplementation
{
Mono2x = 0,
IL2CPP = 1,
WinRTDotNET = 2,
[Obsolete("CoreCLR support is still a work in progress and is disabled for now.")] // Hide from intellisense while CORECLR_FIXME
[EditorBrowsable(EditorBrowsableState.Never)]
CoreCLR = 3,
}
// Must be in sync with Il2CppCompilerConfiguration enum in SerializationMetaFlags.h
public enum Il2CppCompilerConfiguration
{
Debug = 0,
Release = 1,
Master = 2,
}
// Must be in sync with Il2CppStacktraceInformation enum in SerializationMetaFlags.h
public enum Il2CppStacktraceInformation
{
MethodOnly = 0,
MethodFileLineNumber = 1,
}
// Mac fullscreen mode
public enum MacFullscreenMode
{
[Obsolete("Capture Display mode is deprecated, Use FullscreenWindow instead")]
CaptureDisplay = 0,
// Fullscreen window.
FullscreenWindow = 1,
// Fullscreen window with Dock and Menu bar.
FullscreenWindowWithDockAndMenuBar = 2,
}
[Obsolete("D3D9 support has been removed")]
public enum D3D9FullscreenMode
{
[Obsolete("D3D9 support has been removed")]
ExclusiveMode = 0,
[Obsolete("D3D9 support has been removed")]
FullscreenWindow = 1,
}
// Direct3D 11 fullscreen mode
public enum D3D11FullscreenMode
{
// Exclusive mode.
ExclusiveMode = 0,
// Fullscreen window.
FullscreenWindow = 1,
}
// Must be in sync with StereoRenderingPath enum in GfxDeviceTypes.h
public enum StereoRenderingPath
{
// Slow multi pass method ( For reference only )
MultiPass = 0,
// Single pass stereo rendering
SinglePass = 1,
// Single pass stereo rendering with instancing
Instancing = 2
}
// Managed code stripping level - must be in sync with StrippingLevel enum in BuildTargetPlatformSpecific.h
public enum StrippingLevel
{
// Managed code stripping is disabled
Disabled = 0,
// Unused parts of managed code are stripped away
StripAssemblies = 1,
// Managed method bodies are stripped away. AOT platforms only.
StripByteCode = 2,
// Lightweight mscorlib version will be used at expense of limited compatibility.
UseMicroMSCorlib = 3
}
// Script call optimization level
public enum ScriptCallOptimizationLevel
{
// Default setting
SlowAndSafe = 0,
// Script method call overhead decreased at the expense of limited compatibility.
FastButNoExceptions = 1
}
// Default mobile device orientation
public enum UIOrientation
{
// Portrait
Portrait = 0,
// Portrait upside down
PortraitUpsideDown = 1,
// Landscape: clockwise from Portrait
LandscapeRight = 2,
// Landscape : counter-clockwise from Portrait
LandscapeLeft = 3,
// Auto Rotation Enabled
AutoRotation = 4
}
// Scripting runtime version
[Obsolete("ScriptingRuntimeVersion has been deprecated in 2019.3 now that legacy mono has been removed")]
public enum ScriptingRuntimeVersion
{
// .NET 3.5
Legacy = 0,
// .NET 4.6
Latest = 1
}
// .NET API compatibility level
public enum ApiCompatibilityLevel
{
// .NET 2.0
NET_2_0 = 1,
// .NET 2.0 Subset
NET_2_0_Subset = 2,
// .NET 4.6
NET_4_6 = 3,
// unity_web profile, currently unused. Formerly used by Samsung TV
NET_Web = 4,
// micro profile, used by Mono scripting backend if stripping level is set to "Use micro mscorlib"
NET_Micro = 5,
// .NET Standard 2.0
NET_Standard_2_0 = 6,
// Latest .NET Standard version Unity supports
NET_Standard = NET_Standard_2_0,
// .NET Framework 8 + .NET Standard 2.1 APIs
NET_Unity_4_8 = NET_4_6,
}
// Editor Assembly compatibility level
public enum EditorAssembliesCompatibilityLevel
{
// For now it will be the same as #2. In future updates, the default will be the same as #3.
Default = 1,
NET_Unity_4_8 = 2,
NET_Standard = 3,
}
public enum ManagedStrippingLevel
{
Disabled = 0,
Low = 1,
Medium = 2,
High = 3,
Minimal = 4,
}
// What to do on uncaught .NET exception (on iOS)
public enum ActionOnDotNetUnhandledException
{
// Silent exit
SilentExit = 0,
// Crash
Crash = 1
}
[Obsolete("SplashScreenStyle deprecated, Use PlayerSettings.SplashScreen.UnityLogoStyle instead")]
public enum SplashScreenStyle
{
Light = 0,
Dark = 1
}
// Must be in sync with GraphicsJobMode enum in GfxDeviceTypes.h
public enum GraphicsJobMode
{
Native = 0,
Legacy = 1,
Split
}
// Must be in sync with GfxThreadingMode enum in GfxDeviceTypes.h
public enum GfxThreadingMode
{
// Direct threading mode.
// Main thread writes native graphics commands and submits them directly.
Direct = 0,
// SingleThreaded mode.
// Main thread writes Unity graphics commands that it later reads and converts to native graphics commands.
NonThreaded = 1,
// MultiThreaded mode.
// Main thread writes Unity graphics commands. A Render thread reads Unity graphics commands and converts them to native graphics commands.
Threaded = 2,
// Legacy Graphics Jobs ("Jobified Rendering").
// Main thread writes Unity graphics commands and starts worker threads to do the same.
// A Render thread reads Unity graphics commands and converts them to native graphics commands.
ClientWorkerJobs = 3,
// Native Graphics Jobs.
// Main thread writes Unity graphics commands.
// Render thread reads Unity graphics commands and converts them to native graphics commands.
// The render thread also starts worker threads to write native graphics commands.
ClientWorkerNativeJobs = 4,
// Native Graphics Jobs without Render Thread.
// Main thread writes native graphics commands, starts worker threads to do the same, and submits them directly.
DirectNativeJobs = 5,
// Split Graphics Jobs.
// Main thread starts worker threads to write Unity graphics commands.
// Render thread reads Unity graphics commands converts them to native graphics commands.
// The render thread also starts worker threads to write native graphics commands.
SplitJobs = 6
}
// Must be in sync with MeshDeformation enum in GfxDeviceTypes.h
public enum MeshDeformation
{
CPU = 0,
GPU = 1,
GPUBatched = 2
}
// Must be in sync with IconKind enum in EditorOnlyPlayerSettings.h
public enum IconKind
{
Any = -1,
Application = 0,
Settings = 1,
Notification = 2,
Spotlight = 3,
Store = 4
}
// Keep in synch with LightmapEncodingQuality enum from GfxDeviceTypes.h
internal enum LightmapEncodingQuality
{
Low = 0,
Normal = 1,
High = 2
}
// Keep in synch with HDRCubemapEncodingQuality enum from GfxDeviceTypes.h
internal enum HDRCubemapEncodingQuality
{
Low = 0,
Normal = 1,
High = 2
}
// Must be in sync with ShaderPrecisionModel enum in EditorOnlyPlayerSettings.h
public enum ShaderPrecisionModel
{
PlatformDefault = 0,
Unified = 1,
}
public enum NormalMapEncoding
{
XYZ = 0,
DXT5nm = 1
}
public enum TextureCompressionFormat
{
Unknown = 0,
ETC = 1,
ETC2 = 2,
ASTC = 3,
PVRTC = 4,
DXTC = 5,
BPTC = 6,
DXTC_RGTC = 7
}
public enum InsecureHttpOption
{
NotAllowed = 0,
DevelopmentOnly = 1,
AlwaysAllowed = 2,
}
// Windows platform input APIs
// Keep in sync with WindowsGamepadBackendHint enum from PlayerSettings.h
public enum WindowsGamepadBackendHint
{
// Backend selected automatically based on platform support
WindowsGamepadBackendHintDefault = 0,
// XInput
WindowsGamepadBackendHintXInput = 1,
// GameInput
WindowsGamepadBackendHintWindowsGamingInput = 2
}
// 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.
[NativeClass(null)]
[NativeHeader("Editor/Mono/PlayerSettings.bindings.h")]
[NativeHeader("Runtime/Misc/BuildSettings.h")]
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[NativeHeader("Runtime/Misc/PlayerSettingsSplashScreen.h")]
[StaticAccessor("GetPlayerSettings()")]
public sealed partial class PlayerSettings : UnityEngine.Object
{
private PlayerSettings() {}
private static SerializedObject _serializedObject;
[FreeFunction("GetPlayerSettingsPtr")]
private static extern UnityEngine.Object InternalGetPlayerSettingsObject();
internal static void ValidateBuildTargetNameParameter(string buildTargetName, bool unknownIsValid = false)
{
// The empty string is the valid form of BuildTargetGroup.Unknown, so don't throw an execption for that case.
if (BuildPipeline.GetBuildTargetGroupByName(buildTargetName) == BuildTargetGroup.Unknown && (!unknownIsValid || buildTargetName != ""))
throw new ArgumentException($"The provided target platform group name ({buildTargetName}) is not valid.");
}
internal static SerializedObject GetSerializedObject()
{
if (_serializedObject == null || _serializedObject.targetObject != InternalGetPlayerSettingsObject())
_serializedObject = new SerializedObject(InternalGetPlayerSettingsObject());
return _serializedObject;
}
internal static SerializedProperty FindProperty(string name)
{
SerializedProperty property = GetSerializedObject().FindProperty(name);
if (property == null)
Debug.LogError("Failed to find:" + name);
return property;
}
[Obsolete("Use explicit API instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetPropertyInt(string name, int value, BuildTargetGroup target);
[Obsolete("Use explicit API instead.")]
public static void SetPropertyInt(string name, int value)
{
SetPropertyInt(name, value, BuildTargetGroup.Unknown);
}
[Obsolete("Use explicit API instead.")]
public static void SetPropertyInt(string name, int value, BuildTarget target)
{
SetPropertyInt(name, value, BuildPipeline.GetBuildTargetGroup(target));
}
[Obsolete("Use explicit API instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern int GetPropertyInt(string name, BuildTargetGroup target);
[Obsolete("Use explicit API instead.")]
public static int GetPropertyInt(string name)
{
return GetPropertyInt(name, BuildTargetGroup.Unknown);
}
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyOptionalInt(string name, ref int value, BuildTargetGroup target)
{
value = GetPropertyInt(name, target);
return true;
}
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyOptionalInt(string name, ref int value)
{
value = GetPropertyInt(name, BuildTargetGroup.Unknown);
return true;
}
[Obsolete("Use explicit API instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetPropertyBool(string name, bool value, BuildTargetGroup target);
[Obsolete("Use explicit API instead.")]
public static void SetPropertyBool(string name, bool value)
{
SetPropertyBool(name, value, BuildTargetGroup.Unknown);
}
[Obsolete("Use explicit API instead.")]
public static void SetPropertyBool(string name, bool value, BuildTarget target)
{
SetPropertyBool(name, value, BuildPipeline.GetBuildTargetGroup(target));
}
[Obsolete("Use explicit API instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern bool GetPropertyBool(string name, BuildTargetGroup target);
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyBool(string name)
{
return GetPropertyBool(name, BuildTargetGroup.Unknown);
}
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyOptionalBool(string name, ref bool value, BuildTargetGroup target)
{
value = GetPropertyBool(name, target);
return true;
}
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyOptionalBool(string name, ref bool value)
{
value = GetPropertyBool(name, BuildTargetGroup.Unknown);
return true;
}
[Obsolete("Use explicit API instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetPropertyString(string name, string value, BuildTargetGroup target);
[Obsolete("Use explicit API instead.")]
public static void SetPropertyString(string name, string value)
{
SetPropertyString(name, value, BuildTargetGroup.Unknown);
}
[Obsolete("Use explicit API instead.")]
public static void SetPropertyString(string name, string value, BuildTarget target)
{
SetPropertyString(name, value, BuildPipeline.GetBuildTargetGroup(target));
}
[Obsolete("Use explicit API instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern string GetPropertyString(string name, BuildTargetGroup target);
[Obsolete("Use explicit API instead.")]
public static string GetPropertyString(string name)
{
return GetPropertyString(name, BuildTargetGroup.Unknown);
}
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyOptionalString(string name, ref string value, BuildTargetGroup target)
{
value = GetPropertyString(name, target);
return true;
}
[Obsolete("Use explicit API instead.")]
public static bool GetPropertyOptionalString(string name, ref string value)
{
value = GetPropertyString(name, BuildTargetGroup.Unknown);
return true;
}
internal static extern void SetDirty();
// The name of your company.
public static extern string companyName { get; set; }
// The name of your product.
public static extern string productName { get; set; }
[Obsolete("Use PlayerSettings.SplashScreen.show instead")]
[StaticAccessor("GetPlayerSettings().GetSplashScreenSettings()")]
public static extern bool showUnitySplashScreen { get; set; }
[Obsolete("Use PlayerSettings.SplashScreen.unityLogoStyle instead")]
[StaticAccessor("GetPlayerSettings().GetSplashScreenSettings()")]
[NativeProperty("SplashScreenLogoStyle")]
public static extern SplashScreenStyle splashScreenStyle { get; set; }
/// Cloud project id.
[Obsolete("cloudProjectId is deprecated, use CloudProjectSettings.projectId instead")]
public static extern string cloudProjectId { get; }
internal static extern void SetCloudProjectId(string projectId);
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()")]
internal static extern void SetCloudServiceEnabled(string serviceKey, bool enabled);
[StaticAccessor("GetPlayerSettings().GetEditorOnly()")]
internal static extern bool GetCloudServiceEnabled(string serviceKey);
/// Uniquely identifies your product.
public static Guid productGUID
{
get { return new Guid(productGUIDRaw); }
}
/// *undocumented*
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
private static extern byte[] productGUIDRaw { get; }
// Set the color space for the current project
public static extern ColorSpace colorSpace { get; set; }
// Default horizontal dimension of stand-alone player window.
public static extern int defaultScreenWidth { get; set; }
// Default vertical dimension of stand-alone player window.
public static extern int defaultScreenHeight { get; set; }
// Default horizontal dimension of web player window.
public static extern int defaultWebScreenWidth { get; set; }
// Default vertical dimension of web player window.
public static extern int defaultWebScreenHeight { get; set; }
// Defines the behaviour of the Resolution Dialog on product launch.
[Obsolete("displayResolutionDialog has been removed.", false)]
public static extern ResolutionDialogSetting displayResolutionDialog { get; set; }
// If enabled, the game will default to fullscreen mode.
[Obsolete("(defaultIsFullScreen is deprecated, use fullScreenMode instead")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern bool defaultIsFullScreen { get; set; }
// If enabled, the game will default to native resolution in fullscreen mode.
public static extern bool defaultIsNativeResolution { get; set; }
// If enabled, the game will render at retina resolution
public static extern bool macRetinaSupport { get; set; }
// If enabled, your game will continue to run after lost focus.
public static extern bool runInBackground { get; set; }
// Defines if fullscreen games should darken secondary displays.
public static extern bool captureSingleScreen { get; set; }
// Write a log file with debugging information.
public static extern bool usePlayerLog { get; set; }
// Use resizable window in standalone player builds.
public static extern bool resizableWindow { get; set; }
// Should resolution be reset when native window size changes. Shared between iOS & Android platforms.
public static extern bool resetResolutionOnWindowResize { get; set; }
/// Bake collision meshes into the mesh asset.
public static extern bool bakeCollisionMeshes { get; set; }
// Enable receipt validation for the Mac App Store.
public static extern bool useMacAppStoreValidation { get; set; }
// Enable advanced optimiztions for Dedicated Server builds
public static extern bool dedicatedServerOptimizations { get; set; }
// Define how to handle fullscreen mode in Mac OS X standalones
[Obsolete("macFullscreenMode is deprecated, use fullScreenMode instead")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern MacFullscreenMode macFullscreenMode { get; set; }
// Define how to handle fullscreen mode with Direct3D 9
[Obsolete("d3d9FullscreenMode is deprecated, use fullScreenMode instead")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern D3D9FullscreenMode d3d9FullscreenMode { get; set; }
// Define how to handle fullscreen mode with Direct3D 11
[Obsolete("d3d11FullscreenMode is deprecated, use fullScreenMode instead")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern D3D11FullscreenMode d3d11FullscreenMode { get; set; }
[NativeProperty("FullscreenMode")]
public static extern FullScreenMode fullScreenMode { get; set; }
[Obsolete("This API is obsolete, and should no longer be used. Please use XRManagerSettings in the XR Management package instead.")]
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern bool virtualRealitySupported { get; set; }
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
internal class PlayerSettings360StereoCapture
{
public static extern bool enable360StereoCapture
{
get;
set;
}
}
public static bool enable360StereoCapture
{
get { return PlayerSettings360StereoCapture.enable360StereoCapture; }
set { PlayerSettings360StereoCapture.enable360StereoCapture = value; }
}
[Obsolete("singlePassStereoRendering will be deprecated. Use stereoRenderingPath instead.")]
public static bool singlePassStereoRendering
{
get { return stereoRenderingPath == StereoRenderingPath.SinglePass; }
set { stereoRenderingPath = value ? StereoRenderingPath.SinglePass : StereoRenderingPath.MultiPass; }
}
public static extern StereoRenderingPath stereoRenderingPath { get; set; }
[Obsolete("protectGraphicsMemory is deprecated. This field has no effect.", false)]
public static bool protectGraphicsMemory { get { return false; } set {} }
public static extern bool enableFrameTimingStats { get; set; }
public static extern bool enableOpenGLProfilerGPURecorders { get; set; }
public static extern bool allowHDRDisplaySupport { get; set; }
public static extern bool useHDRDisplay { get; set; }
[Obsolete("D3DHDRBitDepth has been replaced by hdrBitDepth. (UnityUpgradable) -> hdrBitDepth", true)]
public static extern D3DHDRDisplayBitDepth D3DHDRBitDepth { [NativeName("GetHDRBitDepthForObseleteEnum")] get; [NativeName("SetHDRBitDepthForObseleteEnum")] set; }
public static extern HDRDisplayBitDepth hdrBitDepth { get; set; }
// What happens with the fullscreen Window when it runs in the background
public static extern bool visibleInBackground { get; set; }
// What happens the user presses OS specific full screen switch key combination
public static extern bool allowFullscreenSwitch { get; set; }
// Restrict standalone players to a single concurrent running instance.
public static extern bool forceSingleInstance { get; set; }
public static extern bool useFlipModelSwapchain { get; set; }
[NativeProperty(TargetType = TargetType.Field)]
public static extern bool openGLRequireES31
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()")]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()")]
set;
}
[NativeProperty(TargetType = TargetType.Field)]
public static extern bool openGLRequireES31AEP
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()")]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()")]
set;
}
[NativeProperty(TargetType = TargetType.Field)]
public static extern bool openGLRequireES32
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()")]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()")]
set;
}
// Set Maximum Vertex Threshold for Sprite Batching.
public static extern int spriteBatchVertexThreshold { get; set; }
// The image to display in the Resolution Dialog window.
[Obsolete("resolutionDialogBanner has been removed.", false)]
public static extern Texture2D resolutionDialogBanner { get; set; }
// The image to display on the Virtual Reality splash screen.
[StaticAccessor("GetPlayerSettings().GetSplashScreenSettings()")]
public static extern Texture2D virtualRealitySplashScreen { get; set; }
// The bundle identifier of the iPhone application.
[Obsolete("iPhoneBundleIdentifier is deprecated. Use PlayerSettings.SetApplicationIdentifier(NamedBuildTarget.iOS) instead.")]
public static string iPhoneBundleIdentifier
{
get { return GetApplicationIdentifier(NamedBuildTarget.iOS); }
set { SetApplicationIdentifier(NamedBuildTarget.iOS, value); }
}
// Note: If an empty list is returned, no icons are assigned specifically to the specified platform at this point,
[NativeMethod("GetPlatformIcons")]
internal static extern Texture2D[] GetIconsForPlatform(string platform, IconKind kind);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
internal static extern Texture2D[] GetIconsForPlatformByKind(int layerCount, string platform, int kind, string subKind, int width, int height);
internal static void SetIconsForPlatform(string platform, Texture2D[] icons)
{
SetIconsForPlatform(platform, icons, IconKind.Any);
}
[NativeThrows]
[NativeMethod("SetPlatformIcons")]
internal static extern void SetIconsForPlatform(string platform, Texture2D[] icons, IconKind kind);
[NativeMethod("GetPlatformIconWidths")]
internal static extern int[] GetIconWidthsForPlatform(string platform, IconKind kind);
[NativeMethod("GetPlatformIconHeights")]
internal static extern int[] GetIconHeightsForPlatform(string platform, IconKind kind);
[NativeMethod("GetPlatformIconKinds")]
internal static extern IconKind[] GetIconKindsForPlatform(string platform);
public static extern UnityEngine.Object[] GetPreloadedAssets();
public static extern void SetPreloadedAssets(UnityEngine.Object[] assets);
internal static string GetPlatformName(BuildTargetGroup targetGroup)
{
return BuildPipeline.GetBuildTargetGroupName(targetGroup);
}
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
internal static extern void GetBatchingForPlatform(BuildTarget platform, out int staticBatching, out int dynamicBatching);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
internal static extern void SetBatchingForPlatform(BuildTarget platform, int staticBatching, int dynamicBatching);
public static bool GetStaticBatchingForPlatform(BuildTarget platform)
{
PlayerSettings.GetBatchingForPlatform(platform, out var staticBatching, out _);
return staticBatching > 0;
}
public static void SetStaticBatchingForPlatform(BuildTarget platform, bool enable)
{
PlayerSettings.GetBatchingForPlatform(platform, out _, out var dynamicBatching);
PlayerSettings.SetBatchingForPlatform(platform, enable == true ? 1 : 0, dynamicBatching);
}
public static bool GetDynamicBatchingForPlatform(BuildTarget platform)
{
PlayerSettings.GetBatchingForPlatform(platform, out _, out var dynamicBatching);
return dynamicBatching > 0;
}
public static void SetDynamicBatchingForPlatform(BuildTarget platform, bool enable)
{
PlayerSettings.GetBatchingForPlatform(platform, out var staticBatching, out _);
PlayerSettings.SetBatchingForPlatform(platform, staticBatching, enable == true ? 1 : 0);
}
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern int GetShaderChunkSizeInMBForPlatform(BuildTarget buildTarget);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetShaderChunkSizeInMBForPlatform(BuildTarget buildTarget, int sizeInMegabytes);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern int GetShaderChunkCountForPlatform(BuildTarget buildTarget);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetShaderChunkCountForPlatform(BuildTarget buildTarget, int chunkCount);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern int GetDefaultShaderChunkSizeInMB();
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetDefaultShaderChunkSizeInMB(int sizeInMegabytes);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern int GetDefaultShaderChunkCount();
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetDefaultShaderChunkCount(int chunkCount);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern bool GetOverrideShaderChunkSettingsForPlatform(BuildTarget buildTarget);
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
public static extern void SetOverrideShaderChunkSettingsForPlatform(BuildTarget buildTarget, bool value);
[NativeMethod("GetLightmapEncodingQuality")]
internal static extern LightmapEncodingQuality GetLightmapEncodingQualityForPlatform(BuildTarget platform);
[NativeMethod("SetLightmapEncodingQuality")]
internal static extern void SetLightmapEncodingQualityForPlatform(BuildTarget platform, LightmapEncodingQuality encodingQuality);
[NativeMethod("GetHDRCubemapEncodingQuality")]
internal static extern HDRCubemapEncodingQuality GetHDRCubemapEncodingQualityForPlatform(BuildTarget platform);
[NativeMethod("SetHDRCubemapEncodingQuality")]
internal static extern void SetHDRCubemapEncodingQualityForPlatform(BuildTarget platform, HDRCubemapEncodingQuality encodingQuality);
[FreeFunction("GetTargetPlatformGraphicsAPIAvailability")]
internal static extern UnityEngine.Rendering.GraphicsDeviceType[] GetSupportedGraphicsAPIs(BuildTarget platform);
[NativeMethod("GetPlatformGraphicsAPIs")]
public static extern UnityEngine.Rendering.GraphicsDeviceType[] GetGraphicsAPIs(BuildTarget platform);
public static void SetGraphicsAPIs(BuildTarget platform, UnityEngine.Rendering.GraphicsDeviceType[] apis)
{
SetGraphicsAPIsImpl(platform, apis);
// we do cache api list in player settings editor, so if we update from script we should forcibly update cache
PlayerSettingsEditor.SyncPlatformAPIsList(platform);
}
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
private static extern void SetGraphicsAPIsImpl(BuildTarget platform, UnityEngine.Rendering.GraphicsDeviceType[] apis);
[NativeMethod("GetPlatformAutomaticGraphicsAPIs")]
public static extern bool GetUseDefaultGraphicsAPIs(BuildTarget platform);
public static void SetUseDefaultGraphicsAPIs(BuildTarget platform, bool automatic)
{
SetUseDefaultGraphicsAPIsImpl(platform, automatic);
// we do cache api list in player settings editor, so if we update from script we should forcibly update cache
PlayerSettingsEditor.SyncPlatformAPIsList(platform);
}
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
private static extern void SetUseDefaultGraphicsAPIsImpl(BuildTarget platform, bool automatic);
// Set the output color space for the current project. This setting only
// defines the format of the final framebuffer and render textures
internal static extern ColorGamut[] GetColorGamuts();
internal static void SetColorGamuts(ColorGamut[] colorSpaces)
{
SetColorGamutsImpl(colorSpaces);
// Color space data is cached in player settings editor
PlayerSettingsEditor.SyncColorGamuts();
}
[NativeMethod("SetColorGamuts")]
private static extern void SetColorGamutsImpl(ColorGamut[] colorSpaces);
internal static extern string[] templateCustomKeys { get; set; }
public static extern void SetTemplateCustomValue(string name, string value);
public static extern string GetTemplateCustomValue(string name);
internal static extern string spritePackerPolicy
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly().spritePackerPolicy")]
[NativeMethod("c_str")]
get;
[StaticAccessor("PlayerSettingsBindings", StaticAccessorType.DoubleColon)]
set;
}
// TargetGroup no longer defines the entire build targets space. Now build targets are better
// identified by a string key (wrapped into NamedBuildTarget), so all the following methods are being replaced.
[Obsolete("Use GetScriptingDefineSymbols(NamedBuildTarget buildTarget) instead")]
public static string GetScriptingDefineSymbolsForGroup(BuildTargetGroup targetGroup) =>
GetScriptingDefineSymbols(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use GetScriptingDefineSymbols(NamedBuildTarget buildTarget, out string[] defines) instead")]
public static void GetScriptingDefineSymbolsForGroup(BuildTargetGroup targetGroup, out string[] defines) =>
defines = ScriptingDefinesHelper.ConvertScriptingDefineStringToArray(GetScriptingDefineSymbolsForGroup(targetGroup));
[Obsolete("Use SetScriptingDefineSymbols(NamedBuildTarget buildTarget, string defines) instead")]
public static void SetScriptingDefineSymbolsForGroup(BuildTargetGroup targetGroup, string defines) =>
SetScriptingDefineSymbols(NamedBuildTarget.FromBuildTargetGroup(targetGroup), defines);
[Obsolete("Use SetScriptingDefineSymbols(NamedBuildTarget buildTarget, string[] defines) instead")]
public static void SetScriptingDefineSymbolsForGroup(BuildTargetGroup targetGroup, string[] defines) =>
SetScriptingDefineSymbols(NamedBuildTarget.FromBuildTargetGroup(targetGroup), defines);
[Obsolete("Use GetAdditionalCompilerArguments(NamedBuildTarget buildTarget) instead")]
public static string[] GetAdditionalCompilerArgumentsForGroup(BuildTargetGroup targetGroup) =>
GetAdditionalCompilerArguments(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use SetAdditionalCompilerArguments(NamedBuildTarget buildTarget, string[] additionalCompilerArguments) instead")]
public static void SetAdditionalCompilerArgumentsForGroup(BuildTargetGroup targetGroup, string[] additionalCompilerArguments) =>
SetAdditionalCompilerArguments(NamedBuildTarget.FromBuildTargetGroup(targetGroup), additionalCompilerArguments);
[Obsolete("Use GetArchitecture(NamedBuildTarget buildTarget) instead")]
public static int GetArchitecture(BuildTargetGroup targetGroup) =>
GetArchitecture(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use SetArchitecture(NamedBuildTarget buildTarget, int architecture) instead")]
public static void SetArchitecture(BuildTargetGroup targetGroup, int architecture) =>
SetArchitecture(NamedBuildTarget.FromBuildTargetGroup(targetGroup), architecture);
[Obsolete("Use GetScriptingBackend(NamedBuildTarget buildTarget) instead")]
public static ScriptingImplementation GetScriptingBackend(BuildTargetGroup targetGroup) =>
GetScriptingBackend(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use SetScriptingBackend(NamedBuildTarget buildTarget, ScriptingImplementation backend) instead")]
public static void SetScriptingBackend(BuildTargetGroup targetGroup, ScriptingImplementation backend) =>
SetScriptingBackend(NamedBuildTarget.FromBuildTargetGroup(targetGroup), backend);
[Obsolete("Use GetDefaultScriptingBackend(NamedBuildTarget buildTarget) instead")]
public static ScriptingImplementation GetDefaultScriptingBackend(BuildTargetGroup targetGroup) =>
GetDefaultScriptingBackend(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use GetApplicationIdentifier(NamedBuildTarget buildTarget) instead")]
public static string GetApplicationIdentifier(BuildTargetGroup targetGroup) =>
GetApplicationIdentifier(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use SetApplicationIdentifier(NamedBuildTarget buildTarget, string identifier) instead")]
public static void SetApplicationIdentifier(BuildTargetGroup targetGroup, string identifier) =>
SetApplicationIdentifier(NamedBuildTarget.FromBuildTargetGroup(targetGroup), identifier);
[Obsolete("Use GetIl2CppCompilerConfiguration(NamedBuildTarget buildTarget) instead")]
public static Il2CppCompilerConfiguration GetIl2CppCompilerConfiguration(BuildTargetGroup targetGroup) =>
GetIl2CppCompilerConfiguration(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use SetIl2CppCompilerConfiguration(NamedBuildTarget buildTarget, Il2CppCompilerConfiguration configuration) instead")]
public static void SetIl2CppCompilerConfiguration(BuildTargetGroup targetGroup, Il2CppCompilerConfiguration configuration) =>
SetIl2CppCompilerConfiguration(NamedBuildTarget.FromBuildTargetGroup(targetGroup), configuration);
[Obsolete("GetIncrementalIl2CppBuild has no impact on the build process")]
public static bool GetIncrementalIl2CppBuild(BuildTargetGroup targetGroup) =>
GetIncrementalIl2CppBuild(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("SetIncrementalIl2CppBuild has no impact on the build process")]
public static void SetIncrementalIl2CppBuild(BuildTargetGroup targetGroup, bool enabled) =>
SetIncrementalIl2CppBuild(NamedBuildTarget.FromBuildTargetGroup(targetGroup), enabled);
[Obsolete("Use SetManagedStrippingLevel(NamedBuildTarget buildTarget, ManagedStrippingLevel level) instead")]
public static void SetManagedStrippingLevel(BuildTargetGroup targetGroup, ManagedStrippingLevel level) =>
SetManagedStrippingLevel(NamedBuildTarget.FromBuildTargetGroup(targetGroup), level);
[Obsolete("Use GetManagedStrippingLevel(NamedBuildTarget buildTarget) instead")]
public static ManagedStrippingLevel GetManagedStrippingLevel(BuildTargetGroup targetGroup) =>
GetManagedStrippingLevel(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use GetApiCompatibilityLevel(NamedBuildTarget buildTarget) instead")]
public static ApiCompatibilityLevel GetApiCompatibilityLevel(BuildTargetGroup buildTargetGroup) =>
GetApiCompatibilityLevel(NamedBuildTarget.FromBuildTargetGroup(buildTargetGroup));
[Obsolete("Use SetApiCompatibilityLevel(NamedBuildTarget buildTarget, ApiCompatibilityLevel value) instead")]
public static void SetApiCompatibilityLevel(BuildTargetGroup buildTargetGroup, ApiCompatibilityLevel value) =>
SetApiCompatibilityLevel(NamedBuildTarget.FromBuildTargetGroup(buildTargetGroup), value);
[Obsolete("Use GetMobileMTRendering(NamedBuildTarget buildTarget) instead")]
public static bool GetMobileMTRendering(BuildTargetGroup targetGroup) =>
GetMobileMTRendering(NamedBuildTarget.FromBuildTargetGroup(targetGroup));
[Obsolete("Use SetMobileMTRendering(NamedBuildTarget buildTarget, bool enable) instead")]
public static void SetMobileMTRendering(BuildTargetGroup targetGroup, bool enable) =>
SetMobileMTRendering(NamedBuildTarget.FromBuildTargetGroup(targetGroup), enable);
[Obsolete("Use GetNormalMapEncoding(NamedBuildTarget buildTarget) instead")]
public static NormalMapEncoding GetNormalMapEncoding(BuildTargetGroup platform) =>
GetNormalMapEncoding(NamedBuildTarget.FromBuildTargetGroup(platform));
[Obsolete("Use SetNormalMapEncoding(NamedBuildTarget buildTarget, NormalMapEncoding encoding) instead")]
public static void SetNormalMapEncoding(BuildTargetGroup platform, NormalMapEncoding encoding) =>
SetNormalMapEncoding(NamedBuildTarget.FromBuildTargetGroup(platform), encoding);
// Get user-specified symbols for script compilation for the given build target name.
[NativeThrows]
[StaticAccessor("GetPlayerSettings().GetEditorOnly()")]
[NativeMethod("GetUserScriptingDefineSymbols")]
private static extern string GetScriptingDefineSymbolsInternal(string buildTargetName);
public static string GetScriptingDefineSymbols(NamedBuildTarget buildTarget) =>
GetScriptingDefineSymbolsInternal(buildTarget.TargetName);
public static void GetScriptingDefineSymbols(NamedBuildTarget buildTarget, out string[] defines) =>
defines = ScriptingDefinesHelper.ConvertScriptingDefineStringToArray(GetScriptingDefineSymbols(buildTarget));