LuaInterface.LuaState.GetFunction C# (CSharp) Method

GetFunction() public method

public GetFunction ( string funcName ) : LuaFunction
funcName string
return LuaFunction
		public LuaFunction GetFunction(string funcName) { return null; }
		public void Dispose() {

Usage Example

コード例 #1
0
	void Start () 
    {
        LuaState state = new LuaState();
        state.Start();
        LuaBinder.Bind(state);

        state.DoString(script);
        state["space"] = Space.World;

        LuaFunction func = state.GetFunction("TestEnum");
        func.BeginPCall();
        func.Push(Space.World);
        func.PCall();
        func.EndPCall();
        func.Dispose();
        func = null;

        GameObject go = GameObject.Find("/Light");
        Light light = go.GetComponent<Light>();
        func = state.GetFunction("ChangeLightType");
        func.BeginPCall();
        func.Push(light);
        func.Push(LightType.Directional);
        func.PCall();
        func.EndPCall();
        func.Dispose();
        func = null;
 
        state.CheckTop();
        state.Dispose();
        state = null;
	}
All Usage Examples Of LuaInterface.LuaState::GetFunction