UI and button click functions for scene loading

scene_loading
Nadine Ganz 2024-06-03 17:24:15 +02:00
parent 50eaf8804a
commit 66ad5d9e10
13 changed files with 13173 additions and 14753 deletions

View File

@ -26,7 +26,7 @@ public class NamedEventTrigger : ComponentHandler {
public override string ContentLabel() {
UpdateComponent();
return "";
return objName;
}
public override void UpdateComponent() {
@ -48,6 +48,8 @@ public class NamedEventTrigger : ComponentHandler {
}
}
public string objName = "ButtonXY";
EventTrigger eventTrigger;
private bool triggered = false;

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 98b0259e801c04bc2af79c596e2ab536
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1 +1 @@
2024-04-26T14:52:17.3584250Z
2024-06-03T15:15:55.6795670Z

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LoadScene : MonoBehaviour
{
public LoadSceneMode loadSceneMode = LoadSceneMode.Single;
public void OnClickLoadScene(string sceneName)
{
StartCoroutine(LoadYourAsyncScene(sceneName));
}
IEnumerator LoadYourAsyncScene(string sceneName)
{
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(sceneName, loadSceneMode);
// Wait until the asynchronous scene fully loads
while (!asyncLoad.isDone)
{
yield return null;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a02dc30496e7423a8975149cb40fdbe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ToggleSceneUI : MonoBehaviour
{
[SerializeField]
GameObject SceneUI;
public void ToggleUI()
{
SceneUI.SetActive(!SceneUI.activeSelf);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b42b16f6277c14821bce679ca29063c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -140,6 +140,8 @@ PlayerSettings:
bundleVersion: 0.1
preloadedAssets:
- {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2}
- {fileID: -8196854396901781169, guid: 1a4c68ca72a83449f938d669337cb305, type: 2}
- {fileID: -64324148185763206, guid: a9a6963505ddf7f4d886008c6dc86122, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1