| 1234567891011121314151617181920212223242526272829303132333435363738 |
- print("existed.lua run ... ...")
- local ExistedTab2 = ExistedTab2 or {}
- function ExistedTab2.Test(info)
- print("ExistedTab.Test Called -> " .. info)
- end
- local function ShowUI()
-
- local gameObject = CS.UnityEngine.GameObject.Find("LogicInstance")
- print("gameObject.name -> " .. gameObject.name)
-
- --CS.UnityEngine.GameObject.Instantiate(gameObject)
- print("Create lua gameObject Finish.")
-
- local canvasStart = LoadResource("prefabs/canvas_start_v2.prefab")
- local uiGameObject = CS.UnityEngine.GameObject.Instantiate(canvasStart)
- print("Create canvasStart Finish.")
- --gameObject:AddComponent(typeof(CS.SUIPanelStart))
- --print("gameObject AddComponent Finish.")
-
- print("uiGameObject.name -> " .. uiGameObject.name)
- local textWelcome = uiGameObject.transform:Find("Panel_Start/Text_Welcome").gameObject
- print("textWelcome.name -> " .. textWelcome.name)
- textWelcome:GetComponent("Text").text = "Welcome to start scene.\nControl by existed2.lua"
- end
- function ExistedTab2.ShowUI()
- ShowUI()
- end
- return ExistedTab2
|