// Unity C# reference source// Copyright (c) Unity Technologies. For terms of use, see// https://unity3d.com/legal/licenses/Unity_Reference_Only_Licenseusing System;using UnityEngine.Bindings;namespace UnityEngine.iOS{// keep in sync with DeviceGeneration enum in trampoline.public enum DeviceGeneration{Unknown = 0,iPhone = 1,iPhone3G = 2,iPhone3GS = 3,iPodTouch1Gen = 4,iPodTouch2Gen = 5,iPodTouch3Gen = 6,iPad1Gen = 7,iPhone4 = 8,iPodTouch4Gen = 9,iPad2Gen = 10,iPhone4S = 11,iPad3Gen = 12,iPhone5 = 13,iPodTouch5Gen = 14,iPadMini1Gen = 15,iPad4Gen = 16,iPhone5C = 17,iPhone5S = 18,iPadAir1 = 19,iPadMini2Gen = 20,iPhone6 = 21,iPhone6Plus = 22,iPadMini3Gen = 23,iPadAir2 = 24,iPhone6S = 25,iPhone6SPlus = 26,iPadPro1Gen = 27,iPadMini4Gen = 28,iPhoneSE1Gen = 29,iPadPro10Inch1Gen = 30,iPhone7 = 31,iPhone7Plus = 32,iPodTouch6Gen = 33,iPad5Gen = 34,iPadPro2Gen = 35,iPadPro10Inch2Gen = 36,iPhone8 = 37,iPhone8Plus = 38,iPhoneX = 39,iPhoneXS = 40,iPhoneXSMax = 41,iPhoneXR = 42,iPadPro11Inch = 43,iPadPro3Gen = 44,iPad6Gen = 45,iPadAir3Gen = 46,iPadMini5Gen = 47,iPhone11 = 48,iPhone11Pro = 49,iPhone11ProMax = 50,iPodTouch7Gen = 51,iPad7Gen = 52,iPhoneSE2Gen = 53,iPhoneUnknown = 10001,iPadUnknown = 10002,iPodTouchUnknown = 10003,}public enum ActivityIndicatorStyle{DontShow = -1, // Do not show ActivityIndicatorWhiteLarge = 0, // The large white style of indicator (UIActivityIndicatorViewStyleWhiteLarge).White = 1, // The standard white style of indicator (UIActivityIndicatorViewStyleWhite).Gray = 2, // The standard gray style of indicator (UIActivityIndicatorViewStyleGray).}[NativeHeader("PlatformDependent/iPhonePlayer/IOSScriptBindings.h")]public sealed partial class Device{extern public static string systemVersion{[FreeFunction("systeminfo::GetDeviceSystemVersion")]get;}extern public static DeviceGeneration generation{[NativeConditional("PLATFORM_IOS")][FreeFunction("UnityDeviceGeneration")]get;}extern public static string vendorIdentifier{[NativeConditional("PLATFORM_IOS || PLATFORM_TVOS")][FreeFunction("UnityVendorIdentifier")]get;}// please note that we check both advertisingIdentifier/advertisingTrackingEnabled// usage in scripts to decide if we should enable UNITY_USES_IAD macro (i.e. code that uses iAD and related things)// that's why it is VERY important that you use private extern functions instead of properties in internal/implementation code// as another caveat, apple seems to grep app strings naively when checking for usages of this api// poterntially finding UnityAdvertisingIdentifier/IsAdvertisingTrackingEnabled// thats why we renamed these functions to be less like apple api[NativeConditional("PLATFORM_IOS || PLATFORM_TVOS")][FreeFunction("UnityAdIdentifier")]extern private static string GetAdIdentifier();public static string advertisingIdentifier{get{string advertisingId = GetAdIdentifier();Application.InvokeOnAdvertisingIdentifierCallback(advertisingId, IsAdTrackingEnabled());return advertisingId;}}[NativeConditional("PLATFORM_IOS || PLATFORM_TVOS")][FreeFunction("IOSScripting::IsAdTrackingEnabled")]extern private static bool IsAdTrackingEnabled();public static bool advertisingTrackingEnabled{get{return IsAdTrackingEnabled();}}extern public static bool hideHomeButton{[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::GetHideHomeButton")] get;[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::SetHideHomeButton")] set;}extern public static bool lowPowerModeEnabled{[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::GetLowPowerModeEnabled")] get;}extern public static bool wantsSoftwareDimming{[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::GetWantsSoftwareDimming")] get;[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::SetWantsSoftwareDimming")] set;}extern private static int deferSystemGesturesModeInternal{[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::GetDeferSystemGesturesMode")] get;[NativeConditional("PLATFORM_IOS")][FreeFunction("IOSScripting::SetDeferSystemGesturesMode")] set;}public static SystemGestureDeferMode deferSystemGesturesMode{get { return (SystemGestureDeferMode)deferSystemGesturesModeInternal; }set { deferSystemGesturesModeInternal = (int)value; }}[NativeConditional("PLATFORM_IOS || PLATFORM_TVOS")][NativeMethod(Name = "IOSScripting::SetNoBackupFlag", IsFreeFunction = true, IsThreadSafe = true)]extern public static void SetNoBackupFlag(string path);[NativeConditional("PLATFORM_IOS || PLATFORM_TVOS")][NativeMethod(Name = "IOSScripting::ResetNoBackupFlag", IsFreeFunction = true, IsThreadSafe = true)]extern public static void ResetNoBackupFlag(string path);[NativeConditional("PLATFORM_IOS")][NativeMethod(Name = "IOSScripting::RequestStoreReview", IsFreeFunction = true, IsThreadSafe = true)]extern public static bool RequestStoreReview();}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。