浏览代码

create an iOS SceneManager script and prefab for looping through scenes

/main
Filip Iliescu 7 年前
当前提交
f0994eb7
共有 7 个文件被更改,包括 156 次插入0 次删除
  1. 42
      Assets/TestScenes/MobileDeferredTest/2DirLightTest/2DirLightTest.unity
  2. 10
      Assets/TestScenes/MobileDeferredTest/TestSceneScript.meta
  3. 28
      Assets/TestScenes/MobileDeferredTest/TestSceneScript/MobileTestSceneManager.cs
  4. 13
      Assets/TestScenes/MobileDeferredTest/TestSceneScript/MobileTestSceneManager.cs.meta
  5. 53
      Assets/TestScenes/MobileDeferredTest/TestSceneScript/TestSceneManager.prefab
  6. 10
      Assets/TestScenes/MobileDeferredTest/TestSceneScript/TestSceneManager.prefab.meta

42
Assets/TestScenes/MobileDeferredTest/2DirLightTest/2DirLightTest.unity


m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1001 &1400194192
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalPosition.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalPosition.z
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4942927082311418, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
propertyPath: m_RootOrder
value: 8
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 73dfbb376901b4b7b98b292ba7c203e5, type: 2}
m_IsPrefabParent: 0
--- !u!1 &1518055134
GameObject:
m_ObjectHideFlags: 0

10
Assets/TestScenes/MobileDeferredTest/TestSceneScript.meta


fileFormatVersion: 2
guid: c7f99bc66f3d8430fad20f498ee68cdc
folderAsset: yes
timeCreated: 1498100008
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

28
Assets/TestScenes/MobileDeferredTest/TestSceneScript/MobileTestSceneManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MobileTestSceneManager : MonoBehaviour {
static int m_NextSceneIndex = 0;
static MobileTestSceneManager Instance;
// Use this for initialization
void Start () {
if (Instance != null) {
GameObject.Destroy (gameObject);
} else {
GameObject.DontDestroyOnLoad (gameObject);
Instance = this;
}
}
// Update is called once per frame
void Update () {
if (Input.touchCount == 1 && Input.GetTouch(0).phase == TouchPhase.Began) {
SceneManager.LoadScene(m_NextSceneIndex++);
}
}
}

13
Assets/TestScenes/MobileDeferredTest/TestSceneScript/MobileTestSceneManager.cs.meta


fileFormatVersion: 2
guid: 875be5407d1be4ece86b5bd6ea22c095
timeCreated: 1498100035
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

53
Assets/TestScenes/MobileDeferredTest/TestSceneScript/TestSceneManager.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1046928737890152}
m_IsPrefabParent: 1
--- !u!1 &1046928737890152
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4942927082311418}
- component: {fileID: 114150254131087770}
m_Layer: 0
m_Name: TestSceneManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4942927082311418
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1046928737890152}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.5, y: 0, z: 0.5}
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 &114150254131087770
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1046928737890152}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 875be5407d1be4ece86b5bd6ea22c095, type: 3}
m_Name:
m_EditorClassIdentifier:

10
Assets/TestScenes/MobileDeferredTest/TestSceneScript/TestSceneManager.prefab.meta


fileFormatVersion: 2
guid: 73dfbb376901b4b7b98b292ba7c203e5
timeCreated: 1498101259
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存