版本:Unity 6 (6000.0)
语言中文(简体)
  • C#

PlayerSettings.SplashScreen.logos

提交建议

成功!

感谢您帮助我们提高 Unity 文档的质量。虽然我们无法接受所有提交,但我们确实会阅读用户提出的每项建议,并会在适当情况下进行更新。

关闭

提交失败

由于某些原因,您建议的更改无法提交。请在几分钟后<a>重试</a>。感谢您抽出时间帮助我们提高 Unity 文档的质量。

关闭

取消

切换到手册
public static SplashScreenLogo[] logos;

说明

启动画面期间显示的徽标合集。徽标按升序绘制,从索引 0 开始,依次是 1 等等。

using UnityEngine;
using UnityEditor;

public class ExampleScript { [MenuItem("SplashScreen/AssignLogos")] public static void AssignLogos() { var logos = new PlayerSettings.SplashScreenLogo[2];

// Company logo Sprite companyLogo = (Sprite)AssetDatabase.LoadAssetAtPath("Assets/SplashScreen/company logo.jpg", typeof(Sprite)); logos[0] = PlayerSettings.SplashScreenLogo.Create(2.5f, companyLogo);

// Set the Unity logo to be drawn after the company logo. logos[1] = PlayerSettings.SplashScreenLogo.CreateWithUnityLogo();

PlayerSettings.SplashScreen.logos = logos; } }