Exemplo n.º 1
0
    void Awake()
    {
        _env       = LuaFacade.Instance.GetLuaEvn();
        newluaView = _env.Global.GetInPath <NewLuaView>("CreateLoginView");
        if (newluaView == null)
        {
            Debug.Log("未找到LoginView.New");
            return;
        }
        _luaView = newluaView(this.gameObject);
        if (_luaView == null)
        {
            Debug.Log("_luaView not create");
            return;
        }
        foreach (var obj in objs)
        {
            _luaView[obj.name] = obj;
        }

        if (_luaView != null)
        {
            _luaView.Awake();
        }
    }
Exemplo n.º 2
0
 private void OnDestroy()
 {
     if (_luaView != null)
     {
         _luaView.OnDestroy();
     }
     _luaView   = null;
     newluaView = null;
 }