Skip to content

Instantly share code, notes, and snippets.

@hiyorin hiyorin/SceneLoader.cs
Last active Oct 20, 2015

What would you like to do?
using UnityEngine;
using System.Collection;
public class Example : MonoBehaviour
void Start ()
StartCoroutine (GenerateLoadProcess ("hogehoge"));
private IEnumerator GenerateLoadProcess (string sceneName)
AsyncOperation asyncOperation = Application.LoadLevelAdditiveAsync (sceneName);
asyncOperation.allowSceneActivation = false;
while (asyncOperation.progress < 0.9f && asyncOperation.isDone == false)
yield return null;
asyncOperation.allowSceneActivation = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.