유니티 기본 스플레시 이미지 없애고 커스텀 스플레시 이미지 사용 하여 앱 인트로 제작 하기.

유니티 기본 스플레시 이미지 없애고 커스텀 스플레시 이미지 사용 하여 앱 인트로 제작 하기.

보통 프로젝트 셋팅에 스플레시 이미지 넣는 곳에 상표 이미지등을 넣는데...

그렇게 하면 뒤 씬의 로딩 길이 동안 보통 보여집니다.

즉. 시간이 일정 하지 않고 간단한 로딩이면 스마트폰에서 슉 사라져 버리곤 하지요.

그래서 일정 하게 하려면...

프로젝트 셋팅의 스플레시 이미지에는 가로세로 1픽셀 블랙 이미지를 하나 만들어서 적용 합니다.

그리고

아래와 같은 함수를 만듭니다.

SplashLoad.unity 파일을 만든다.
그 안에 UITexture 로 사용 할 스플레이 이미지 적용.

비어있는 GameObject 를 하나 만들고 아래와 같이 클래스 생성 후 GameObject  에 컴포넌트로 적용 한다.


빌드셋팅에서 SplashLoad.unity 는 0 번이 된다.

Splash.cs
using UnityEngine;  
using System.Collections;   
public class Splash : MonoBehaviour 
{           
IEnumerator Start ()   
{        
yield return new WaitForSeconds(3);    
Debug.Log("Wait to 3 Second for Splash:   " + Time.timeSinceLevelLoad);        
AsyncOperation async =  Application.LoadLevelAsync(1);    
Debug.Log("Loading 100% :"   + async);        
yield return async;   }  

이렇게 만들고 스마트폰에 빌드 하면 유니티 로고 스플레시가 살아 지고 사용자 스플레시 화면이 나타난다.

그리고 사용자가 지정 한 시간만큼 딜레이를 줄 수 있다.

단 다음 로딩 될 레벨은 데이터 로딩 화면등이 되어야 한다.

너무 큰 씬을 스플레시 씬 다음에 바로 로딩 하면 의미가 없어진다.
Game Developer Leegoon copyright all right reserved since 2010.

Comments

  1. Right now it appears like Wordpress is the best blogging platform out there right now.
    (from what I've read) Is that what you are using on your blog?

    Here is my web site ... Play Batman Games

    ReplyDelete
  2. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. 먹튀검증

    ReplyDelete
  3. I read your blog frequently and I just thought I’d say keep up the amazing work! 먹튀폴리스

    ReplyDelete

Post a Comment

덧글쓰기 기능 있는거 아시죠? ㅋㅋ

Popular Posts