Unknown
4 年前
当前提交
a72a0657
共有 12 个文件被更改,包括 351 次插入 和 42 次删除
-
117UOP1_Project/Assets/Scenes/LoadingTest/Beach.unity
-
89UOP1_Project/Assets/Scenes/LoadingTest/Forest.unity
-
71UOP1_Project/Assets/Scenes/MainMenu.unity
-
12UOP1_Project/Assets/Scripts/SceneManagement/LevelEnd.cs
-
6UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs
-
45UOP1_Project/Assets/Prefabs/EditorInitializer.prefab
-
7UOP1_Project/Assets/Prefabs/EditorInitializer.prefab.meta
-
8UOP1_Project/Assets/Scripts/SceneManagement.meta
-
27UOP1_Project/Assets/Scripts/SceneManagement/LoadSceneLoader.cs
-
11UOP1_Project/Assets/Scripts/SceneManagement/LoadSceneLoader.cs.meta
-
0/UOP1_Project/Assets/Scripts/SceneManagement/LevelEnd.cs
-
0/UOP1_Project/Assets/Scripts/SceneManagement/LocationLoader.cs
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &40564194958535835 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 40564194958535909} |
|||
- component: {fileID: 40564194958535908} |
|||
m_Layer: 0 |
|||
m_Name: EditorInitializer |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &40564194958535909 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 40564194958535835} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!114 &40564194958535908 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 40564194958535835} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: afdc0d26809578642bceb401301d2a8a, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|
|||
fileFormatVersion: 2 |
|||
guid: 54d1f8b93400ea64d97c276fab375df3 |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 26591c04f99d3164cab8d592f8b74ac8 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
using UnityEngine.SceneManagement; |
|||
|
|||
/// <summary>
|
|||
/// This class contains method to allow starting the game from any scene
|
|||
/// </summary>
|
|||
|
|||
public class LoadSceneLoader : MonoBehaviour |
|||
{ |
|||
void Start() |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
if (SceneManager.sceneCount > 0) |
|||
{ |
|||
for (int i = 0; i < SceneManager.sceneCount; ++i) |
|||
{ |
|||
Scene scene = SceneManager.GetSceneAt(i); |
|||
if (scene.name == "ScenesLoader") |
|||
{ |
|||
return; |
|||
} |
|||
} |
|||
SceneManager.LoadSceneAsync("ScenesLoader", LoadSceneMode.Additive); |
|||
} |
|||
#endif
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: afdc0d26809578642bceb401301d2a8a |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue