/
PlayerSettingsIOS.bindings.cs
733 lines (615 loc) · 28.3 KB
/
PlayerSettingsIOS.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
// 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.Linq;
using System.Text.RegularExpressions;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using UnityEditorInternal;
using UnityEditor.PlatformSupport;
using UnityEngine.Bindings;
using UnityEngine;
using UnityEditor.Build;
namespace UnityEditor
{
// AppleMobile CPU architecture.
// Matches enum in EditorOnlyPlayerSettings.h.
// For Device
[Flags]
public enum AppleMobileArchitecture : uint
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("ARMv7 is no longer supported", true)]
ARMv7 = 0,
ARM64 = 1 << 0,
Universal = 1 << 1
}
// For Simulator
public enum AppleMobileArchitectureSimulator
{
X86_64 = 0,
ARM64 = 1 << 0,
Universal = 1 << 1
}
// Supported iOS SDK versions
public enum iOSSdkVersion
{
// Device SDK
DeviceSDK = 988,
// Simulator SDK
SimulatorSDK = 989
}
// Target iOS device
public enum iOSTargetDevice
{
// iPhone/iPod Only
iPhoneOnly = 0,
// iPad Only
iPadOnly = 1,
// Universal : iPhone/iPod + iPad
iPhoneAndiPad = 2,
}
// "Show Loading Indicator" enums for the Player Settings
// Keep in sync with iOSDevice.bindings.cs ActivityIndicatorStyle which is the user script API
public enum iOSShowActivityIndicatorOnLoading
{
// Don't Show
DontShow = -1,
// WhiteLarge - Deprecated
[Obsolete("WhiteLarge Activity Indicator has been deprecated by Apple. Use Large instead (UnityUpgradable) -> Large", true)]
WhiteLarge = 0,
// White - Deprecated
[Obsolete("White Activity Indicator has been deprecated by Apple. Use Medium instead (UnityUpgradable) -> Medium", true)]
White = 1,
// Gray - Deprecated
[Obsolete("Gray Activity Indicator has been deprecated by Apple. Use Medium instead (UnityUpgradable) -> Medium", true)]
Gray = 2,
// Medium (Old White and Gray)
Medium = 100,
// Large (Old WhiteLarge)
Large = 101,
}
// iOS status bar style
public enum iOSStatusBarStyle
{
// Default syle: iOS picks the automatically based on the user interface style.
Default = 0,
// A light status bar, intended for use on dark backgrounds
LightContent = 1,
// A dark status bar, intended for use on light backgrounds
DarkContent = 2,
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("BlackTranslucent has no effect, use LightContent instead (UnityUpgradable) -> LightContent", true)]
BlackTranslucent = -1,
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[Obsolete("BlackOpaque has no effect, use LightContent instead (UnityUpgradable) -> LightContent", true)]
BlackOpaque = -1,
}
public enum iOSAppInBackgroundBehavior
{
Custom = -1,
Suspend = 0,
[Obsolete("UIApplicationExitsOnSuspend is no longer supported in iOS 13, use Custom or Suspend instead (UnityUpgradable) -> Custom", true)]
Exit = 1,
}
[Flags]
public enum iOSBackgroundMode: uint
{
None = 0,
Audio = 1 << 0,
Location = 1 << 1,
VOIP = 1 << 2,
NewsstandContent = 1 << 3,
ExternalAccessory = 1 << 4,
BluetoothCentral = 1 << 5,
BluetoothPeripheral = 1 << 6,
Fetch = 1 << 7,
RemoteNotification = 1 << 8,
Processing = 1 << 9,
}
public enum iOSLaunchScreenImageType
{
iPhonePortraitImage = 0,
iPhoneLandscapeImage = 1,
iPadImage = 2,
}
// extern splash screen type (on iOS)
public enum iOSLaunchScreenType
{
Default = 0,
ImageAndBackgroundRelative = 1,
ImageAndBackgroundConstant = 4,
CustomStoryboard = 5,
[Obsolete("CustomXib is no longer supported. Use CustomStoryboard instead", true)]
CustomXib = 2,
[Obsolete("Launch Images are no longer supported by Apple. (UnityUpgradable) -> Default", true)]
None = 3,
}
internal enum iOSAutomaticallySignValue
{
AutomaticallySignValueNotSet = 0,
AutomaticallySignValueTrue = 1,
AutomaticallySignValueFalse = 2
}
public enum ProvisioningProfileType
{
Automatic,
Development,
Distribution
}
public class iOSDeviceRequirement
{
SortedDictionary<string, string> m_Values = new SortedDictionary<string, string>();
public IDictionary<string, string> values { get { return m_Values; } }
}
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[NativeHeader("Editor/Src/PlayerSettingsIOS.bindings.h")]
internal partial class iOSDeviceRequirementGroup
{
private string m_VariantName;
[FreeFunction("PlayerSettingsIOSBindings::SetOrAddDeviceRequirementForVariantNameImpl")]
extern private static void SetOrAddDeviceRequirementForVariantNameImpl(string name, int index, [Unmarshalled] string[] keys, [Unmarshalled] string[] values);
[NativeMethod(Name = "GetIOSDeviceRequirementCountForVariantName")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern private static int GetCountForVariantImpl(string name);
//[NativeMethod("RemoveIOSDeviceRequirementForVariantName")]
[NativeMethod(Name = "RemoveIOSDeviceRequirementForVariantName")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
extern private static void RemoveAtImpl(string name, int index);
internal iOSDeviceRequirementGroup(string variantName)
{
m_VariantName = variantName;
}
[FreeFunction("PlayerSettingsIOSBindings::GetDeviceRequirementForVariantNameImpl")]
extern private static void GetDeviceRequirementForVariantNameImplInternal(string name, int index, [Out] string[] keys, [Out] string[] values);
[FreeFunction("PlayerSettingsIOSBindings::GetDeviceRequirementForVariantCount")]
extern private static int GetDeviceRequirementForVariantCount(string name, int index);
private static void GetDeviceRequirementForVariantNameImpl(string name, int index, out string[] keys, out string[] values)
{
int requirementCount = GetDeviceRequirementForVariantCount(name, index);
keys = new string[requirementCount];
values = new string[requirementCount];
GetDeviceRequirementForVariantNameImplInternal(name, index, keys, values);
}
public int count { get { return GetCountForVariantImpl(m_VariantName); } }
public iOSDeviceRequirement this[int index]
{
get
{
string[] keys;
string[] values;
GetDeviceRequirementForVariantNameImpl(m_VariantName, index, out keys, out values);
var result = new iOSDeviceRequirement();
for (int i = 0; i < keys.Length; ++i)
{
result.values.Add(keys[i], values[i]);
}
return result;
}
set
{
SetOrAddDeviceRequirementForVariantNameImpl(m_VariantName, index, value.values.Keys.ToArray(),
value.values.Values.ToArray());
}
}
public void RemoveAt(int index)
{
RemoveAtImpl(m_VariantName, index);
}
public void Add(iOSDeviceRequirement requirement)
{
SetOrAddDeviceRequirementForVariantNameImpl(m_VariantName, -1, requirement.values.Keys.ToArray(),
requirement.values.Values.ToArray());
}
}
// 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
{
// iOS specific player settings
[NativeHeader("Runtime/Misc/PlayerSettings.h")]
[NativeHeader("Editor/Src/EditorUserBuildSettings.h")]
[StaticAccessor("GetPlayerSettings()", StaticAccessorType.Dot)]
public partial class iOS
{
// iOS application display name
[NativeProperty("ProductName")]
public extern static string applicationDisplayName { get; set; }
// iOS bundle build number
public static string buildNumber
{
get { return PlayerSettings.GetBuildNumber(NamedBuildTarget.iOS.TargetName); }
set { PlayerSettings.SetBuildNumber(NamedBuildTarget.iOS.TargetName, value); }
}
public extern static bool disableDepthAndStencilBuffers { get; set; }
// Script calling optimization
private extern static int scriptCallOptimizationInternal
{
[NativeMethod("GetiPhoneScriptCallOptimization")]
get;
[NativeMethod("SetiPhoneScriptCallOptimization")]
set;
}
public static ScriptCallOptimizationLevel scriptCallOptimization
{
get { return (ScriptCallOptimizationLevel)scriptCallOptimizationInternal; }
set { scriptCallOptimizationInternal = (int)value; }
}
// Active iOS SDK version used for build
private extern static int sdkVersionInternal
{
[NativeMethod("GetiPhoneSdkVersion")]
get;
[NativeMethod("SetiPhoneSdkVersion")]
set;
}
public static iOSSdkVersion sdkVersion
{
get { return (iOSSdkVersion)sdkVersionInternal; }
set { sdkVersionInternal = (int)value; }
}
// Simulator Architectures
private extern static int simulatorSdkArchitectureInternal
{
[NativeMethod("GetiOSSimulatorArchitecture")]
get;
[NativeMethod("SetiOSSimulatorArchitecture")]
set;
}
public static AppleMobileArchitectureSimulator simulatorSdkArchitecture
{
get { return (AppleMobileArchitectureSimulator)simulatorSdkArchitectureInternal; }
set { simulatorSdkArchitectureInternal = (int)value; }
}
[FreeFunction]
private extern static string iOSTargetOSVersionObsoleteEnumToString(int val);
[FreeFunction]
private extern static int iOSTargetOSVersionStringToObsoleteEnum(string val);
// Deployment minimal version of iOS
[Obsolete("OBSOLETE warning targetOSVersion is obsolete, use targetOSVersionString")]
public static iOSTargetOSVersion targetOSVersion
{
get
{
return (iOSTargetOSVersion)iOSTargetOSVersionStringToObsoleteEnum(targetOSVersionString);
}
set
{
targetOSVersionString = iOSTargetOSVersionObsoleteEnumToString((int)value);
}
}
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeMethod("GetiOSMinimumVersionString")]
static extern string GetMinimumVersionString();
internal static readonly Version minimumOsVersion = new Version(GetMinimumVersionString());
[NativeProperty("iOSTargetOSVersion")]
public extern static string targetOSVersionString
{
[NativeMethod("GetiOSTargetOSVersion")]
get;
[NativeMethod("SetiOSTargetOSVersion")]
set;
}
// Targeted device
[NativeProperty("TargetDevice")]
private extern static int targetDeviceInternal { get; set; }
// Active iOS SDK version used for build
public static iOSTargetDevice targetDevice
{
get { return (iOSTargetDevice)targetDeviceInternal; }
set { targetDeviceInternal = (int)value; }
}
// Icon is prerendered
[NativeProperty("UIPrerenderedIcon")]
public extern static bool prerenderedIcon { get; set; }
// Application requires persistent WiFi
[NativeProperty("UIRequiresPersistentWiFi")]
public extern static bool requiresPersistentWiFi { get; set; }
// Require Full Screen on iOS for iOS 9.0 Multitasking support
[NativeProperty("UIRequiresFullScreen")]
public extern static bool requiresFullScreen { get; set; }
// Status bar style
[NativeProperty("UIStatusBarStyle")]
private extern static int statusBarStyleInternal { get; set; }
[NativeProperty("UIStatusBarStyle")]
public static iOSStatusBarStyle statusBarStyle
{
get { return (iOSStatusBarStyle)statusBarStyleInternal; }
set { statusBarStyleInternal = (int)value; }
}
// On iPhone 10 the home button is implemented as a system gesture. (swipe up
// from the lower edge). This might interfere with games that use swipes as
// an interaction method. iOS provides a way to reduce the chance of unwanted
// interaction by marking edges as "protected" edges, so the system gesture
// is not recognized on the first swipe, but on the second if it comes
// immediately afterwards.
[NativeProperty("DeferSystemGesturesMode")]
private extern static int deferSystemGesturesModeInternal { get; set; }
public static UnityEngine.iOS.SystemGestureDeferMode deferSystemGesturesMode
{
get { return (UnityEngine.iOS.SystemGestureDeferMode)deferSystemGesturesModeInternal; }
set { deferSystemGesturesModeInternal = (int)value; }
}
[NativeProperty("HideHomeButton")]
public extern static bool hideHomeButton { get; set; }
[NativeProperty("IOSAppInBackgroundBehavior")]
private extern static int appInBackgroundBehaviorInternal
{
[FreeFunction("PlayerSettingsIOSBindings::GetAppInBackgroundBehavior")]
get;
[FreeFunction("PlayerSettingsIOSBindings::SetAppInBackgroundBehavior")]
set;
}
public static iOSAppInBackgroundBehavior appInBackgroundBehavior
{
get { return (iOSAppInBackgroundBehavior)appInBackgroundBehaviorInternal; }
set { appInBackgroundBehaviorInternal = (int)value; }
}
[NativeProperty("IOSBackgroundModes")]
private extern static int backgroundModesInternal { get; set; }
[NativeProperty("IOSAppInBackgroundBehavior")]
public static iOSBackgroundMode backgroundModes
{
get { return (iOSBackgroundMode)backgroundModesInternal; }
set { backgroundModesInternal = (int)value; }
}
[NativeProperty("IOSMetalForceHardShadows")]
public extern static bool forceHardShadowsOnMetal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[Obsolete("Use PlayerSettings.insecureHttpOption", false)]
public static bool allowHTTPDownload
{
get { return PlayerSettings.insecureHttpOption == InsecureHttpOption.AlwaysAllowed; }
set { PlayerSettings.insecureHttpOption = value ? InsecureHttpOption.AlwaysAllowed : InsecureHttpOption.NotAllowed; }
}
[NativeProperty("AppleDeveloperTeamID")]
private extern static string appleDeveloperTeamIDInternal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
public static string appleDeveloperTeamID
{
get
{
return appleDeveloperTeamIDInternal.Length < 1 ?
EditorPrefs.GetString("DefaultiOSAutomaticSignTeamId") : appleDeveloperTeamIDInternal;
}
set { appleDeveloperTeamIDInternal = value; }
}
[NativeProperty("iOSManualProvisioningProfileID")]
private extern static string iOSManualProvisioningProfileIDInternal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
public static string iOSManualProvisioningProfileID
{
get
{
return String.IsNullOrEmpty(iOSManualProvisioningProfileIDInternal) ?
EditorPrefs.GetString("DefaultiOSProvisioningProfileUUID") : iOSManualProvisioningProfileIDInternal;
}
set
{
iOSManualProvisioningProfileIDInternal = value;
}
}
[NativeProperty("tvOSManualProvisioningProfileID")]
private extern static string tvOSManualProvisioningProfileIDInternal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
public static string tvOSManualProvisioningProfileID
{
get
{
return String.IsNullOrEmpty(tvOSManualProvisioningProfileIDInternal) ?
EditorPrefs.GetString("DefaulttvOSProvisioningProfileUUID") : tvOSManualProvisioningProfileIDInternal;
}
set
{
tvOSManualProvisioningProfileIDInternal = value;
}
}
[NativeProperty("VisionOSManualProvisioningProfileID")]
private extern static string VisionOSManualProvisioningProfileIDInternal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
public static string VisionOSManualProvisioningProfileID
{
get
{
return String.IsNullOrEmpty(VisionOSManualProvisioningProfileIDInternal) ?
EditorPrefs.GetString("DefaultVisionOSProvisioningProfileUUID") : VisionOSManualProvisioningProfileIDInternal;
}
set
{
VisionOSManualProvisioningProfileIDInternal = value;
}
}
[NativeProperty("tvOSManualProvisioningProfileType")]
public static extern ProvisioningProfileType tvOSManualProvisioningProfileType
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("iOSManualProvisioningProfileType")]
public static extern ProvisioningProfileType iOSManualProvisioningProfileType
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("VisionOSManualProvisioningProfileType")]
public static extern ProvisioningProfileType VisionOSManualProvisioningProfileType
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("AppleEnableAutomaticSigning")]
private extern static int appleEnableAutomaticSigningInternal
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
public static bool appleEnableAutomaticSigning
{
get
{
return appleEnableAutomaticSigningInternal == (int)iOSAutomaticallySignValue.AutomaticallySignValueNotSet ?
EditorPrefs.GetBool("DefaultiOSAutomaticallySignBuild") :
(iOSAutomaticallySignValue)appleEnableAutomaticSigningInternal == iOSAutomaticallySignValue.AutomaticallySignValueTrue;
}
set
{
appleEnableAutomaticSigningInternal = value ?
(int)iOSAutomaticallySignValue.AutomaticallySignValueTrue :
(int)iOSAutomaticallySignValue.AutomaticallySignValueFalse;
}
}
[NativeProperty("CameraUsageDescription")]
public extern static string cameraUsageDescription { get; set; }
[NativeProperty("LocationUsageDescription")]
public extern static string locationUsageDescription { get; set; }
[NativeProperty("MicrophoneUsageDescription")]
public extern static string microphoneUsageDescription { get; set; }
[NativeProperty("IOSShowActivityIndicatorOnLoading")]
private extern static int showActivityIndicatorOnLoadingInternal { get; set; }
// Application should show ActivityIndicator when loading
[NativeProperty("IOSAppInBackgroundBehavior")]
public static iOSShowActivityIndicatorOnLoading showActivityIndicatorOnLoading
{
get { return (iOSShowActivityIndicatorOnLoading)showActivityIndicatorOnLoadingInternal; }
set { showActivityIndicatorOnLoadingInternal = (int)value; }
}
[NativeProperty("UseOnDemandResources")]
public extern static bool useOnDemandResources { get; set; }
// will be public
[NativeMethod(Name = "GetIOSVariantsWithDeviceRequirements")]
extern internal static string[] GetAssetBundleVariantsWithDeviceRequirements();
private static extern int GetIOSDeviceRequirementCountForVariantName(string name);
private static bool CheckAssetBundleVariantHasDeviceRequirements(string name)
{
return GetIOSDeviceRequirementCountForVariantName(name) > 0;
}
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("iOSLaunchScreenPortrait", TargetType.Field)]
internal extern static Texture2D launchScreenPortrait { get; }
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("iOSLaunchScreenLandscape", TargetType.Field)]
internal extern static Texture2D launchScreenLandscape { get; }
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
[NativeProperty("iOSLaunchScreeniPadImage", TargetType.Field)]
internal extern static Texture2D launchScreeniPadImage { get; }
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
[NativeMethod(Name = "SetiOSLaunchScreenImage")]
private extern static void SetLaunchScreenImageInternal(Texture2D image, int type);
public static void SetLaunchScreenImage(Texture2D image, iOSLaunchScreenImageType type)
{
SetLaunchScreenImageInternal(image, (int)type);
}
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
private extern static void SetiOSLaunchScreenType(int type, int device);
public static void SetiPhoneLaunchScreenType(iOSLaunchScreenType type)
{
SetiOSLaunchScreenType((int)type, 0);
}
public static void SetiPadLaunchScreenType(iOSLaunchScreenType type)
{
SetiOSLaunchScreenType((int)type, 1);
}
// will be public
internal static iOSDeviceRequirementGroup GetDeviceRequirementsForAssetBundleVariant(string name)
{
if (!CheckAssetBundleVariantHasDeviceRequirements(name))
return null;
return new iOSDeviceRequirementGroup(name);
}
// will be public
internal static void RemoveDeviceRequirementsForAssetBundleVariant(string name)
{
var group = GetDeviceRequirementsForAssetBundleVariant(name);
for (int i = 0; i < group.count; ++i)
group.RemoveAt(0);
}
// will be public
internal static iOSDeviceRequirementGroup AddDeviceRequirementsForAssetBundleVariant(string name)
{
return new iOSDeviceRequirementGroup(name);
}
[NativeProperty("iOSURLSchemes", false, TargetType.Function)]
public extern static string[] iOSUrlSchemes
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("iOSRequireARKit")]
internal extern static bool requiresARKitSupport
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal extern static bool appleEnableProMotion
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
[NativeProperty("iOSAutomaticallyDetectAndAddCapabilities")]
internal extern static bool automaticallyDetectAndAddCapabilities
{
[StaticAccessor("GetPlayerSettings().GetEditorOnly()", StaticAccessorType.Dot)]
get;
[StaticAccessor("GetPlayerSettings().GetEditorOnlyForUpdate()", StaticAccessorType.Dot)]
set;
}
internal static bool IsTargetVersionEqualOrHigher(Version requiredVersion)
{
Version requestedVersion;
try
{
requestedVersion = new Version(targetOSVersionString);
}
catch (Exception)
{
requestedVersion = minimumOsVersion;
}
return requestedVersion >= requiredVersion;
}
internal static string[] GetURLSchemes()
{
return iOSUrlSchemes;
}
}
}
}