浏览代码

Create and destroy subsystems between scene switches

/4.0
Tim Mowrer 5 年前
当前提交
92ad05a9
共有 2 个文件被更改,包括 41 次插入32 次删除
  1. 66
      Assets/Scripts/UX/ARSceneSelectUI.cs
  2. 7
      Assets/Scripts/UX/BackButton.cs

66
Assets/Scripts/UX/ARSceneSelectUI.cs


}
}
static void LoadScene(string sceneName)
{
LoaderUtility.Initialize();
SceneManager.LoadScene(sceneName, LoadSceneMode.Single);
}
SceneManager.LoadScene("SimpleAR", LoadSceneMode.Single);
LoadScene("SimpleAR");
SceneManager.LoadScene("ImageTracking", LoadSceneMode.Single);
LoadScene("ImageTracking");
SceneManager.LoadScene("Anchors", LoadSceneMode.Single);
LoadScene("Anchors");
SceneManager.LoadScene("ARCollaborationDataExample", LoadSceneMode.Single);
LoadScene("ARCollaborationDataExample");
SceneManager.LoadScene("ARKitCoachingOverlay", LoadSceneMode.Single);
LoadScene("ARKitCoachingOverlay");
SceneManager.LoadScene("ARWorldMap", LoadSceneMode.Single);
LoadScene("ARWorldMap");
public void CameraImageButtonPressed()
public void CpuImagesButtonPressed()
SceneManager.LoadScene("CameraImage", LoadSceneMode.Single);
LoadScene("CpuImages");
SceneManager.LoadScene("Check Support", LoadSceneMode.Single);
LoadScene("Check Support");
SceneManager.LoadScene("EnvironmentProbes", LoadSceneMode.Single);
LoadScene("EnvironmentProbes");
SceneManager.LoadScene("ObjectTracking", LoadSceneMode.Single);
LoadScene("ObjectTracking");
SceneManager.LoadScene("PlaneOcclusion", LoadSceneMode.Single);
LoadScene("PlaneOcclusion");
SceneManager.LoadScene("AllPointCloudPoints", LoadSceneMode.Single);
LoadScene("AllPointCloudPoints");
SceneManager.LoadScene("Scale", LoadSceneMode.Single);
LoadScene("Scale");
SceneManager.LoadScene("SampleUXScene", LoadSceneMode.Single);
LoadScene("SampleUXScene");
}
public void FaceTrackingMenuButtonPressed()

}
public void ARCoreFaceRegionsButtonPressed()
{
SceneManager.LoadScene("ARCoreFaceRegions", LoadSceneMode.Single);
LoadScene("ARCoreFaceRegions");
SceneManager.LoadScene("ARKitFaceBlendShapes", LoadSceneMode.Single);
LoadScene("ARKitFaceBlendShapes");
SceneManager.LoadScene("EyeLasers", LoadSceneMode.Single);
LoadScene("EyeLasers");
SceneManager.LoadScene("EyePoses", LoadSceneMode.Single);
LoadScene("EyePoses");
SceneManager.LoadScene("FaceMesh", LoadSceneMode.Single);
LoadScene("FaceMesh");
SceneManager.LoadScene("FacePose", LoadSceneMode.Single);
LoadScene("FacePose");
SceneManager.LoadScene("FixationPoint", LoadSceneMode.Single);
LoadScene("FixationPoint");
SceneManager.LoadScene("WorldCameraWithUserFacingFaceTracking", LoadSceneMode.Single);
LoadScene("WorldCameraWithUserFacingFaceTracking");
}
public void HumanSegmentationMenuButtonPressed()

}
public void HumanSegmentation2DButtonPressed()
{
SceneManager.LoadScene("HumanBodyTracking2D", LoadSceneMode.Single);
LoadScene("HumanBodyTracking2D");
SceneManager.LoadScene("HumanBodyTracking3D", LoadSceneMode.Single);
LoadScene("HumanBodyTracking3D");
SceneManager.LoadScene("HumanSegmentationImages", LoadSceneMode.Single);
LoadScene("HumanSegmentationImages");
SceneManager.LoadScene("LightEstimation", LoadSceneMode.Single);
LoadScene("LightEstimation");
}
public void PlaneDetectionMenuButtonPressed()

}
public void FeatheredPlanesButtonPressed()
{
SceneManager.LoadScene("FeatheredPlanes", LoadSceneMode.Single);
LoadScene("FeatheredPlanes");
SceneManager.LoadScene("PlaneClassification", LoadSceneMode.Single);
LoadScene("PlaneClassification");
SceneManager.LoadScene("TogglePlaneDetection", LoadSceneMode.Single);
LoadScene("TogglePlaneDetection");
}

7
Assets/Scripts/UX/BackButton.cs


using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.Management;
public class BackButton : MonoBehaviour
{

get { return m_BackButton; }
set { m_BackButton = value; }
}
void Start()
{
if (Application.CanStreamedLevelBeLoaded("Menu"))

}
public void BackButtonPressed()
{
{
LoaderUtility.Deinitialize();
}
}
正在加载...
取消
保存