unitytools/Assets/UnityTools/script/test.cs
2024-11-12 02:50:27 +08:00

25 lines
971 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class test : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
GameObject gameObject = popUpsCanvas.popUpsCanvasobj.addPopUp(popUpsCanvas.popUpsCanvasobj.VerNormalPopUpWindow);//²âÊÔ
gameObject.GetComponent<NormalPopUpWindow>().setMode(ModeEnum.fixedSize);
gameObject.GetComponent<NormalPopUpWindow>().setMinimumHeight(300);
List <BoxTypeItem> light = new List<BoxTypeItem>();
light.Add(new BoxTypeItem { type = 0,content="²âÊÔ°´Å¥"});
light.Add(new BoxTypeItem { type = 1,content="²âÊÔ°´Å¥"});
List<GameObject> gameObjects = gameObject.GetComponent<NormalPopUpWindow>().newPopup(light,"²âÊÔ±êÌâ");
gameObjects[0].GetComponent<PopUpWindowitem>().register_click(async (BoxTypeItem boxType, int type) =>
{
Debug.Log(type);
});
}
}