| | |
| | |
|
| | | PlayerSettings.Android.splashScreenScale = AndroidSplashScreenScale.ScaleToFill;
|
| | | }
|
| | | else if (buildTarget == BuildTargetGroup.iOS)
|
| | | {
|
| | | var projectSettings = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset")[0]);
|
| | | // 使用 Image and background (relative) 模式
|
| | | projectSettings.FindProperty("iOSLaunchScreenType").intValue = 1;
|
| | | // 设置 iPhone 竖屏启动图
|
| | | projectSettings.FindProperty("iOSLaunchScreenPortrait").objectReferenceValue = splashImage.texture;
|
| | | // 设置 iPhone 横屏启动图
|
| | | projectSettings.FindProperty("iOSLaunchScreenLandscape").objectReferenceValue = splashImage.texture;
|
| | | // iPad 也使用独立的 Image and background 模式(必须设为 1 才能触发 iPad Storyboard 和图片的重新生成)
|
| | | projectSettings.FindProperty("iOSLaunchScreeniPadType").intValue = 1;
|
| | | // 设置 iPad 启动图
|
| | | projectSettings.FindProperty("iOSLaunchScreeniPadImage").objectReferenceValue = splashImage.texture;
|
| | | projectSettings.ApplyModifiedProperties();
|
| | | Debug.Log($"[ClientPackage] iOS LaunchScreen 已设置,version: {_versionName}");
|
| | | }
|
| | | }
|
| | |
|
| | | public static void SetCreateRoleAnimation()
|