LuaClient.Init C# (CSharp) Method

Init() protected method

protected Init ( ) : void
return void
    protected void Init()
    {
        InitLoader();
        luaState = new LuaState();
        OpenLibs();
        luaState.LuaSetTop(0);
        Bind();
        LoadLuaFiles();
    }

Usage Example

Example #1
0
    public override void Init()
    {
        if (luaObject == null)
        {
            luaObject = new GameObject("LuaClientObject");
            luaClient = luaObject.AddComponent <LuaClient>();
            GameObject.DontDestroyOnLoad(luaObject);
            dicObjScript = new Dictionary <GameObject, CScriptObject>();
            luaClient.Init();
        }

        instance = this;
    }