JungUtil(MyCustomUtil)
2023. 9. 11. 12:41ㆍPublic/Unity
예시 사용코드
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 필요
JungUtil.unitypackage
0.01MB
'Public > Unity' 카테고리의 다른 글
CustomTMP_Flip (0) | 2023.10.09 |
---|---|
SRP 정리 (0) | 2023.09.12 |
Custom SRP (진행중) (0) | 2023.09.10 |
Unity Tip (0) | 2023.09.04 |
[MyUtil] LayOutHelper(오브젝트 정리) (0) | 2023.06.10 |