local ZUILoginPanel = {}

function ZUILoginPanel.Awake(luaRoot)
	ZUILoginPanel.luaRoot = luaRoot

	local canvas = CS.UnityEngine.GameObject.Find("Canvas")
	ZUILoginPanel._rootCanvas = canvas

	local prefabPanelLogin = LoadResource("Prefabs/UI/ZUILoginPanel.prefab")
	local rootPanel = CS.UnityEngine.GameObject.Instantiate(prefabPanelLogin, ZUILoginPanel._rootCanvas.transform)
	ZUILoginPanel.rootPanel = rootPanel
end

function ZUILoginPanel.Start(luaRoot)
	local rootPanel = ZUILoginPanel.rootPanel
	rootPanel.transform:Find("Text"):GetComponent("Text").text = "test001"
end

function ZUILoginPanel.OnDestroy()
	CS.UnityEngine.GameObject.Destroy(ZUILoginPanel.rootPanel)
end

return ZUILoginPanel