diff --git a/Assets/01_Scenes/Cave_Test_2.unity b/Assets/01_Scenes/Cave_Test_2.unity index 08018405..b410cd73 100644 --- a/Assets/01_Scenes/Cave_Test_2.unity +++ b/Assets/01_Scenes/Cave_Test_2.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc88d3d96a4e2edd620ab64f940e7f3e0cb504e96496fac76942abfd371b2608 -size 1095662 +oid sha256:1cc69ef7f6af67f3f082045336cb66d7222fe5d890a0543273cd65b9eab0a2d9 +size 1915913 diff --git a/Assets/01_Scenes/MazeRoom.unity b/Assets/01_Scenes/MazeRoom.unity index d7e2943c..bc4df383 100644 --- a/Assets/01_Scenes/MazeRoom.unity +++ b/Assets/01_Scenes/MazeRoom.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aeb3d59a18b6a33575598f737931085b02561dba8dc1e83a9b77f626b75423e5 -size 3357599 +oid sha256:8f649eeb59aacf4816e7d310ffdaceefe8a926da6805c1a56bd8ac0186b87fda +size 3360046 diff --git a/Assets/01_Scenes/WhaleAdventure_VR/WhaleAttackScene.unity b/Assets/01_Scenes/WhaleAdventure_VR/WhaleAttackScene.unity index 21414f04..557b78ea 100644 --- a/Assets/01_Scenes/WhaleAdventure_VR/WhaleAttackScene.unity +++ b/Assets/01_Scenes/WhaleAdventure_VR/WhaleAttackScene.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a8814b35845dc5a63b68d93dcc9f4ea6939346c1a30ceffc6864f6fcf57d65f -size 73032 +oid sha256:7d6586ca857eeac3d4d13d6394a57d9e97e31015c70268164a28a4d1066a989d +size 76700 diff --git a/Assets/01_Scenes/blackjack.unity b/Assets/01_Scenes/blackjack.unity index dcb56037..119c20c6 100644 --- a/Assets/01_Scenes/blackjack.unity +++ b/Assets/01_Scenes/blackjack.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b593ef51335c380326430e147b400c442953ef410da8e3899d88bc8042c35c14 -size 2310050 +oid sha256:9aa57a2c6111cb1db90a502532e68953f2851a1b5f7b404543be9f5c5ae377d8 +size 3137795 diff --git a/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs b/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs index 73b6870c..54f6e665 100644 --- a/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs +++ b/Assets/02_Scripts/Managers/change room manager/RandomSceneRouteManager.cs @@ -13,7 +13,6 @@ public class RandomSceneRouteManager : MonoBehaviour [SerializeField] private string finalSceneName; private readonly HashSet visitedScenes = new HashSet(); - private bool finalSceneUsed = false; private string nextSceneCode1 = ""; private string nextSceneCode2 = ""; @@ -26,6 +25,7 @@ private void Awake() { Instance = this; DontDestroyOnLoad(gameObject); + SceneManager.sceneLoaded += OnSceneLoaded; } else { @@ -33,10 +33,28 @@ private void Awake() } } + private void OnDestroy() + { + if (Instance == this) + { + SceneManager.sceneLoaded -= OnSceneLoaded; + } + } + + private void OnSceneLoaded(Scene scene, LoadSceneMode mode) + { + string loadedSceneName = scene.name.Trim(); + + if (IsRoomScene(loadedSceneName)) + { + visitedScenes.Add(loadedSceneName); + Debug.Log("¹æ¹® ó¸®µÈ ¾À: " + loadedSceneName); + } + } + public void PrepareNextSceneChoices() { - string currentSceneName = SceneManager.GetActiveScene().name; - Debug.Log("ÇöÀç ¾À À̸§: " + currentSceneName); + string currentSceneName = SceneManager.GetActiveScene().name.Trim(); if (IsRoomScene(currentSceneName)) { @@ -48,21 +66,17 @@ public void PrepareNextSceneChoices() foreach (string sceneName in roomSceneNames) { if (string.IsNullOrWhiteSpace(sceneName)) - { continue; - } string cleanSceneName = sceneName.Trim(); + // ÇöÀç ¹æÀº ¼±ÅÃÁö¿¡¼­ Á¦¿Ü if (cleanSceneName == currentSceneName) - { continue; - } + // ÀÌ¹Ì ¹æ¹®ÇÑ ¹æµµ Á¦¿Ü if (visitedScenes.Contains(cleanSceneName)) - { continue; - } candidates.Add(cleanSceneName); } @@ -74,29 +88,35 @@ public void PrepareNextSceneChoices() nextSceneName1 = ""; nextSceneName2 = ""; - if (candidates.Count >= 1) + // ³²Àº ¹æÀÌ 2°³ ÀÌ»óÀÌ¸é ¹æ 2°³ ¼±ÅÃÁö Ç¥½Ã + if (candidates.Count >= 2) { nextSceneCode1 = candidates[0]; nextSceneName1 = GetDisplayName(nextSceneCode1); - } - if (candidates.Count >= 2) - { nextSceneCode2 = candidates[1]; nextSceneName2 = GetDisplayName(nextSceneCode2); } - else if (candidates.Count == 1 && !finalSceneUsed && !string.IsNullOrWhiteSpace(finalSceneName)) + // ³²Àº ¹æÀÌ 1°³¸é ±× ¹æ¸¸ Ç¥½Ã + else if (candidates.Count == 1) { - nextSceneCode2 = finalSceneName.Trim(); - nextSceneName2 = GetDisplayName(nextSceneCode2); - } + nextSceneCode1 = candidates[0]; + nextSceneName1 = GetDisplayName(nextSceneCode1); - if (candidates.Count == 0) + // Áß¿ä: ¸¶Áö¸· ¹æÀÌ ³²¾ÆÀÖÀ» ¶§´Â Á¦ÆäÅä ¹æÀ» ¼±ÅÃÁö 2·Î ³ÖÁö ¾ÊÀ½ + nextSceneCode2 = ""; + nextSceneName2 = ""; + } + // ³²Àº ¹æÀÌ 0°³¸é ±×¶§¸¸ Á¦ÆäÅä ¹æ Ç¥½Ã + else { - if (!finalSceneUsed && !string.IsNullOrWhiteSpace(finalSceneName)) + if (!string.IsNullOrWhiteSpace(finalSceneName)) { nextSceneCode1 = finalSceneName.Trim(); nextSceneName1 = GetDisplayName(nextSceneCode1); + + nextSceneCode2 = ""; + nextSceneName2 = ""; } else { @@ -104,6 +124,8 @@ public void PrepareNextSceneChoices() } } + Debug.Log("ÇöÀç ¾À: " + currentSceneName); + Debug.Log("¹æ¹®ÇÑ ¾À ¼ö: " + visitedScenes.Count); Debug.Log("¼±ÅÃÁö 1: " + nextSceneName1 + " / " + nextSceneCode1); Debug.Log("¼±ÅÃÁö 2: " + nextSceneName2 + " / " + nextSceneCode2); } @@ -133,33 +155,45 @@ public string GetNextSceneName() PrepareNextSceneChoices(); if (!string.IsNullOrEmpty(nextSceneCode1)) - { return nextSceneCode1; - } return string.Empty; } - public void MarkSceneVisited(string sceneName) + public void RequestRandomSceneChange() { - if (string.IsNullOrWhiteSpace(sceneName)) + string nextSceneName = GetNextSceneName(); + + if (string.IsNullOrEmpty(nextSceneName)) { + Debug.LogWarning("À̵¿ÇÒ ´ÙÀ½ ¾À À̸§ÀÌ ºñ¾îÀÖ½À´Ï´Ù."); return; } - string cleanSceneName = sceneName.Trim(); + SceneLoadManager loadManager = FindFirstObjectByType(); - if (cleanSceneName == finalSceneName) + if (loadManager != null) { - finalSceneUsed = true; + Debug.Log("·£´ý ¾À À̵¿ ¿äû: " + nextSceneName); + loadManager.RequestSceneChange(nextSceneName); } - - if (IsRoomScene(cleanSceneName)) + else { - visitedScenes.Add(cleanSceneName); + Debug.LogWarning("SceneLoadManager°¡ ¾ø¾î¼­ ¹Ù·Î ¾À À̵¿ÇÕ´Ï´Ù: " + nextSceneName); + SceneManager.LoadScene(nextSceneName); } + } - Debug.Log("¹æ¹® ó¸®µÈ ¾À: " + cleanSceneName); + public void ResetRoute() + { + visitedScenes.Clear(); + + nextSceneCode1 = ""; + nextSceneCode2 = ""; + nextSceneName1 = ""; + nextSceneName2 = ""; + + Debug.Log("·£´ý ¹æ ¹æ¹® ±â·Ï ÃʱâÈ­"); } private void Shuffle(List list) @@ -189,6 +223,9 @@ private string GetDisplayName(string sceneName) case "Cave_Test_2": return "µ¿±¼¹æ"; + case "Gepto first": + return "Á¦ÆäÅä"; + default: return sceneName; } @@ -199,49 +236,12 @@ private bool IsRoomScene(string sceneName) foreach (string roomSceneName in roomSceneNames) { if (string.IsNullOrWhiteSpace(roomSceneName)) - { continue; - } - if (roomSceneName.Trim() == sceneName) - { + if (roomSceneName.Trim() == sceneName.Trim()) return true; - } } return false; } - - public void RequestRandomSceneChange() - { - if (SceneLoadManager.Instance == null) - { - Debug.LogError("SceneLoadManager°¡ ¾ø½À´Ï´Ù."); - return; - } - - string nextSceneName = GetNextSceneName(); - - if (string.IsNullOrEmpty(nextSceneName)) - { - Debug.LogWarning("À̵¿ÇÒ ´ÙÀ½ ¾À À̸§ÀÌ ºñ¾îÀÖ½À´Ï´Ù."); - return; - } - - Debug.Log("·£´ý ¾À À̵¿ ¿äû: " + nextSceneName); - SceneLoadManager.Instance.RequestSceneChange(nextSceneName); - } - - public void ResetRoute() - { - visitedScenes.Clear(); - finalSceneUsed = false; - - nextSceneCode1 = ""; - nextSceneCode2 = ""; - nextSceneName1 = ""; - nextSceneName2 = ""; - - Debug.Log("·£´ý ¹æ ¹æ¹® ±â·Ï ÃʱâÈ­"); - } } \ No newline at end of file diff --git a/Assets/04_Models/Cave/Clam/BIRUG 19135a aligned_material_0.jpg b/Assets/04_Models/Cave/Clam/BIRUG 19135a aligned_material_0.jpg index 8b19df3a..87b37fc1 100644 --- a/Assets/04_Models/Cave/Clam/BIRUG 19135a aligned_material_0.jpg +++ b/Assets/04_Models/Cave/Clam/BIRUG 19135a aligned_material_0.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7082c24660911427a4f9cf7ab804a82ca45e26b8cf67e080afc09c2dd0162d3 -size 734005 +oid sha256:ff6b0e75e1b14d499d49dca5bc5eaa7744638c1da445d3d93500cd9d6ecbf314 +size 986632 diff --git a/Assets/04_Models/Cave/Clam/BIRUG 19135b aligned_material_0.jpg b/Assets/04_Models/Cave/Clam/BIRUG 19135b aligned_material_0.jpg index 67b8cfdf..a67a065a 100644 --- a/Assets/04_Models/Cave/Clam/BIRUG 19135b aligned_material_0.jpg +++ b/Assets/04_Models/Cave/Clam/BIRUG 19135b aligned_material_0.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d7889a41fb49a69d8fcc5dc845d9097b5d50e735dd409f235a42d8a3886f36d -size 814436 +oid sha256:57932eb5bfd01d77a08f2da521fe998cc63df22f70cc7efc11d0f1739c169222 +size 1110543 diff --git a/Assets/My project/Fonts/Pretendard-Black SDF.asset b/Assets/My project/Fonts/Pretendard-Black SDF.asset index 617368a4..afbcf0ab 100644 --- a/Assets/My project/Fonts/Pretendard-Black SDF.asset +++ b/Assets/My project/Fonts/Pretendard-Black SDF.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:683f3abcb887175600cc47702f9e566c4c614b8ef41438a4c516a23b997d26c6 -size 41413216 +oid sha256:a81a06b57f04031dc553ed2a18857edbf18e5f2ef32f65f713e538f6cebf5da5 +size 7807136 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset index 19f87263..625a1c4a 100644 --- a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset +++ b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06458142b1e806fbba1e415f22b2c262a80a8881a3ebb880f89a841f77f3eb3f -size 544626 +oid sha256:8dc6471d84975f90f9f65db979eb4b41da6f0d61c6b8b5b891e86f7123c11a10 +size 17480