DEG-84 [Fix] 조이스틱 컨트롤러 및 에디터 수정
씬에 따라 활성화 될 UI 판단하여 활성화 코드 추가 에디터 폴더 수정
This commit is contained in:
parent
c31e9df7cb
commit
7479aaeac9
@ -1,23 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Unity.VisualScripting;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
public class JoystickPanelController : MonoBehaviour
|
|
||||||
{
|
|
||||||
public void OnClickAttackButton()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnClickDashButton()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnClickInteractionButton()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
BIN
Assets/LYM/Scenes/HousingUI.unity
(Stored with Git LFS)
BIN
Assets/LYM/Scenes/HousingUI.unity
(Stored with Git LFS)
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a7e1feb6ebaf3bd4d9978ca3c76fdcc7
|
guid: bb031fff0dd38c1499e8108a1b04c699
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
44
Assets/LYM/Scripts/JoystickPanelController.cs
Normal file
44
Assets/LYM/Scripts/JoystickPanelController.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Unity.VisualScripting;
|
||||||
|
using UnityEditor.SearchService;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class JoystickPanelController : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private GameObject dungeonUI;
|
||||||
|
[SerializeField] private GameObject housingUI;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
dungeonUI.SetActive(false);
|
||||||
|
housingUI.SetActive(false);
|
||||||
|
//현재 씬 이름 확인해 UI 별 활성화 판단
|
||||||
|
if (SceneManager.GetActiveScene().name == "HousingUI")
|
||||||
|
{
|
||||||
|
housingUI.SetActive(true);
|
||||||
|
}
|
||||||
|
else if (SceneManager.GetActiveScene().name == "DungeonUI")
|
||||||
|
{
|
||||||
|
dungeonUI.SetActive(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickAttackButton()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickDashButton()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClickInteractionButton()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
BIN
Assets/LYM/UIPrefabs/HousingMainUIPanel.prefab
(Stored with Git LFS)
BIN
Assets/LYM/UIPrefabs/HousingMainUIPanel.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/LYM/UIPrefabs/JoystickPanel.prefab
(Stored with Git LFS)
BIN
Assets/LYM/UIPrefabs/JoystickPanel.prefab
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user