Overview
스플래시 로고 출력 패키지.
사용자 상황에 맞게 두가지 사용법을 제공합니다.
자동출력 (권장)
위와 같이 Splash Scene 내에서 게임오브젝트에 Percent Splash Player를 AddComponent 합니다. 그리고 Play Automatically 옵션을 활성화하면 자동호출 됩니다.
다음 씬이동 예제:
public class SampleSplashScene : MonoBehaviour
{
[SerializeField] private PercentSplashPlayer _player;
private void Awake() => _player.OnFinishedSplashEvent.AddListener(() =>
{
SceneManager.LoadScene(1, LoadSceneMode.Single); //씬 로드
});
}
코드로 출력
public class SampleSplashScene : MonoBehaviour
{
[SerializeField] private PercentSplashPlayer _player;
private async void Awake()
{
_player.OnFinishedSplashEvent.AddListener(OnLoadScene);
await _player.PlayAsync(); //CI 호출
}
private void OnLoadScene()
{
SceneManager.LoadScene(1, LoadSceneMode.Single); //씬 로드
}
}