Public/Unity
JungUtil(MyCustomUtil)
Wingold
2023. 9. 11. 12:41
예시 사용코드
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.ResourceManagement.AsyncOperations;
using JungUtil;
using JungUtil.Popup;
public class Test : MonoBehaviour
{
[SerializeField] private Canvas mCanvas;
private PopupMessageBoxDesc Desc;
private PopupCommonButtonDesc LBDesc;
private PopupCommonButtonDesc RBDesc;
private void Start()
{
LBDesc = new PopupCommonButtonDesc("OK", () => { Debug.Log("확인"); });
RBDesc = new PopupCommonButtonDesc("Close", () => { Debug.Log("취소"); });
Desc = new PopupMessageBoxDesc
(
"Test Message Box , Hello World?",
LBDesc,
RBDesc
);
}
void Update()
{
if(Input.GetKeyDown(KeyCode.S))
{
//Show MessageBox
Popup.ShowMessageBox(Desc, mCanvas);
//Popup.ShowMessageBox(Desc, mCanvas, () => { Debug.Log("ShowCallback"); }, () => { Debug.Log("CloseCallback"); });
}
}
}
주의사항 Dotween , Addressable, TextMeshPro 필요