/// <summary> /// 読込開始 /// </summary> /// <param name="id"></param> /// <param name="addtive"></param> /// <param name="async"></param> public SceneLoader(SceneDefine.SCENE_ID id, bool addtive, bool async) { SceneID = id; Name = SceneDefine.SceneNames[(int)id]; this.addtive = addtive; this.async = async; if (async) { var param = new UnityEngine.SceneManagement.LoadSceneParameters(); if (addtive) { param.loadSceneMode = UnityEngine.SceneManagement.LoadSceneMode.Additive; } else { param.loadSceneMode = UnityEngine.SceneManagement.LoadSceneMode.Single; } asyncOperation = UnitySceneManager.LoadSceneAsync(Name, param); } else { if (addtive) { UnitySceneManager.LoadScene(Name, UnityEngine.SceneManagement.LoadSceneMode.Additive); } else { UnitySceneManager.LoadScene(Name, UnityEngine.SceneManagement.LoadSceneMode.Single); } } }
static int LoadScene(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1 && TypeChecker.CheckTypes <int>(L, 1)) { int arg0 = (int)LuaDLL.lua_tonumber(L, 1); UnityEngine.SceneManagement.SceneManager.LoadScene(arg0); return(0); } else if (count == 1 && TypeChecker.CheckTypes <string>(L, 1)) { string arg0 = ToLua.ToString(L, 1); UnityEngine.SceneManagement.SceneManager.LoadScene(arg0); return(0); } else if (count == 2 && TypeChecker.CheckTypes <int, UnityEngine.SceneManagement.LoadSceneMode>(L, 1)) { int arg0 = (int)LuaDLL.lua_tonumber(L, 1); UnityEngine.SceneManagement.LoadSceneMode arg1 = (UnityEngine.SceneManagement.LoadSceneMode)ToLua.ToObject(L, 2); UnityEngine.SceneManagement.SceneManager.LoadScene(arg0, arg1); return(0); } else if (count == 2 && TypeChecker.CheckTypes <int, UnityEngine.SceneManagement.LoadSceneParameters>(L, 1)) { int arg0 = (int)LuaDLL.lua_tonumber(L, 1); UnityEngine.SceneManagement.LoadSceneParameters arg1 = StackTraits <UnityEngine.SceneManagement.LoadSceneParameters> .To(L, 2); UnityEngine.SceneManagement.Scene o = UnityEngine.SceneManagement.SceneManager.LoadScene(arg0, arg1); ToLua.PushValue(L, o); return(1); } else if (count == 2 && TypeChecker.CheckTypes <string, UnityEngine.SceneManagement.LoadSceneMode>(L, 1)) { string arg0 = ToLua.ToString(L, 1); UnityEngine.SceneManagement.LoadSceneMode arg1 = (UnityEngine.SceneManagement.LoadSceneMode)ToLua.ToObject(L, 2); UnityEngine.SceneManagement.SceneManager.LoadScene(arg0, arg1); return(0); } else if (count == 2 && TypeChecker.CheckTypes <string, UnityEngine.SceneManagement.LoadSceneParameters>(L, 1)) { string arg0 = ToLua.ToString(L, 1); UnityEngine.SceneManagement.LoadSceneParameters arg1 = StackTraits <UnityEngine.SceneManagement.LoadSceneParameters> .To(L, 2); UnityEngine.SceneManagement.Scene o = UnityEngine.SceneManagement.SceneManager.LoadScene(arg0, arg1); ToLua.PushValue(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.SceneManagement.SceneManager.LoadScene")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int constructor(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif int argc = LuaDLL.lua_gettop(l); UnityEngine.SceneManagement.LoadSceneParameters o; if (argc == 2) { UnityEngine.SceneManagement.LoadSceneMode a1; a1 = (UnityEngine.SceneManagement.LoadSceneMode)LuaDLL.luaL_checkinteger(l, 2); o = new UnityEngine.SceneManagement.LoadSceneParameters(a1); pushValue(l, true); pushValue(l, o); return(2); } else if (argc == 3) { UnityEngine.SceneManagement.LoadSceneMode a1; a1 = (UnityEngine.SceneManagement.LoadSceneMode)LuaDLL.luaL_checkinteger(l, 2); UnityEngine.SceneManagement.LocalPhysicsMode a2; a2 = (UnityEngine.SceneManagement.LocalPhysicsMode)LuaDLL.luaL_checkinteger(l, 3); o = new UnityEngine.SceneManagement.LoadSceneParameters(a1, a2); pushValue(l, true); pushValue(l, o); return(2); } else if (argc == 0) { o = new UnityEngine.SceneManagement.LoadSceneParameters(); pushValue(l, true); pushObject(l, o); return(2); } return(error(l, "New object failed.")); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int ctor_s(IntPtr l) { try { UnityEngine.SceneManagement.LoadSceneParameters o; o = new UnityEngine.SceneManagement.LoadSceneParameters(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int ctor__LoadSceneMode_s(IntPtr l) { try { UnityEngine.SceneManagement.LoadSceneParameters o; UnityEngine.SceneManagement.LoadSceneMode a1; checkEnum(l, 1, out a1); o = new UnityEngine.SceneManagement.LoadSceneParameters(a1); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); UnityEngine.SceneManagement.LoadSceneParameters o; if (argc == 4) { UnityEngine.SceneManagement.LoadSceneMode a1; checkEnum(l, 3, out a1); UnityEngine.SceneManagement.LocalPhysicsMode a2; checkEnum(l, 4, out a2); o = new UnityEngine.SceneManagement.LoadSceneParameters(a1, a2); pushValue(l, true); pushValue(l, o); return(2); } else if (argc == 3) { UnityEngine.SceneManagement.LoadSceneMode a1; checkEnum(l, 3, out a1); o = new UnityEngine.SceneManagement.LoadSceneParameters(a1); pushValue(l, true); pushValue(l, o); return(2); } else if (argc <= 2) { o = new UnityEngine.SceneManagement.LoadSceneParameters(); pushValue(l, true); pushValue(l, o); return(2); } return(error(l, "New object failed.")); } catch (Exception e) { return(error(l, e)); } }
public static void LoadScene(int sceneBuildIndex) { LoadSceneParameters parameters = new LoadSceneParameters(LoadSceneMode.Single); SceneManager.LoadScene(sceneBuildIndex, parameters); }
public static Scene LoadScene(string sceneName, LoadSceneParameters parameters) { SceneManager.LoadSceneAsyncNameIndexInternal(sceneName, -1, parameters, true); return(SceneManager.GetSceneAt(SceneManager.sceneCount - 1)); }
public static void LoadScene(int sceneBuildIndex, [DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { LoadSceneParameters parameters = new LoadSceneParameters(mode); SceneManager.LoadScene(sceneBuildIndex, parameters); }
public static Scene LoadScene(int sceneBuildIndex, LoadSceneParameters parameters) { return(SceneManager.LoadScene(sceneBuildIndex, parameters)); }
public static void LoadScene(string sceneName) { var parameters = new LoadSceneParameters(LoadSceneMode.Single); LoadScene(sceneName, parameters); }
public static AsyncOperation LoadSceneAsync(int sceneBuildIndex, LoadSceneParameters parameters) { return(SceneManager.LoadSceneAsyncNameIndexInternal(null, sceneBuildIndex, parameters, false)); }
public static AsyncOperation LoadSceneAsync(string sceneName) { LoadSceneParameters parameters = new LoadSceneParameters(LoadSceneMode.Single); return(SceneManager.LoadSceneAsync(sceneName, parameters)); }
private static AsyncOperation LoadSceneAsyncNameIndexInternal(string sceneName, int sceneBuildIndex, LoadSceneParameters parameters, bool mustCompleteNextFrame) { if (!s_AllowLoadScene) { return(null); } return(SceneManagerAPI.ActiveAPI.LoadSceneAsyncByNameOrIndex(sceneName, sceneBuildIndex, parameters, mustCompleteNextFrame)); }
public static extern AsyncOperation LoadSceneAsyncNameIndexInternal(string sceneName, int sceneBuildIndex, LoadSceneParameters parameters, bool mustCompleteNextFrame);
public static AsyncOperation LoadSceneAsync(string sceneName, [uei.DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { var parameters = new LoadSceneParameters(mode); return(LoadSceneAsync(sceneName, parameters)); }
public static AsyncOperation LoadSceneAsync(int sceneBuildIndex, LoadSceneParameters parameters) { return(SceneManager.LoadSceneAsync(sceneBuildIndex, parameters)); }
public static AsyncOperation LoadSceneAsync(int sceneBuildIndex, [uei.DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { var parameters = new LoadSceneParameters(mode); return(LoadSceneAsync(sceneBuildIndex, parameters)); }
public static void LoadScene(int sceneBuildIndex) { var parameters = new LoadSceneParameters(LoadSceneMode.Single); LoadScene(sceneBuildIndex, parameters); }
public static void LoadScene(int sceneBuildIndex, [uei.DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { var parameters = new LoadSceneParameters(mode); LoadScene(sceneBuildIndex, parameters); }
public static Scene LoadScene(int sceneBuildIndex, LoadSceneParameters parameters) { SceneManager.LoadSceneAsyncNameIndexInternal(null, sceneBuildIndex, parameters, true); return(SceneManager.GetSceneAt(SceneManager.sceneCount - 1)); }
public static AsyncOperation LoadSceneAsync(string sceneName, LoadSceneParameters parameters) { sceneName = getBuildSettingsScenePath(sceneName); return(SceneManager.LoadSceneAsync(sceneName, parameters)); }
public static AsyncOperation LoadSceneAsync(int sceneBuildIndex) { LoadSceneParameters parameters = new LoadSceneParameters(LoadSceneMode.Single); return(SceneManager.LoadSceneAsync(sceneBuildIndex, parameters)); }
private static AsyncOperation LoadSceneAsyncNameIndexInternal(string sceneName, int sceneBuildIndex, LoadSceneParameters parameters, bool mustCompleteNextFrame) { bool flag = !SceneManager.s_AllowLoadScene; AsyncOperation result; if (flag) { result = null; } else { result = SceneManagerAPI.ActiveAPI.LoadSceneAsyncByNameOrIndex(sceneName, sceneBuildIndex, parameters, mustCompleteNextFrame); } return(result); }
public static AsyncOperation LoadSceneAsync(string sceneName, [DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { LoadSceneParameters parameters = new LoadSceneParameters(mode); return(SceneManager.LoadSceneAsync(sceneName, parameters)); }
public static void LoadScene(string sceneName, [DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { LoadSceneParameters parameters = new LoadSceneParameters(mode); SceneManager.LoadScene(sceneName, parameters); }
public static AsyncOperation LoadSceneAsync(string sceneName, LoadSceneParameters parameters) { return(SceneManager.LoadSceneAsyncNameIndexInternal(sceneName, -1, parameters, false)); }
public static void LoadScene(string sceneName) { LoadSceneParameters parameters = new LoadSceneParameters(LoadSceneMode.Single); SceneManager.LoadScene(sceneName, parameters); }
protected internal virtual AsyncOperation LoadSceneAsyncByNameOrIndex(string sceneName, int sceneBuildIndex, LoadSceneParameters parameters, bool mustCompleteNextFrame) => SceneManagerAPIInternal.LoadSceneAsyncNameIndexInternal(sceneName, sceneBuildIndex, parameters, mustCompleteNextFrame);
public static void LoadScene(string sceneName, [uei.DefaultValue("LoadSceneMode.Single")] LoadSceneMode mode) { var parameters = new LoadSceneParameters(mode); LoadScene(sceneName, parameters); }