Пример #1
0
    public T Call <T>(string functionName, params object[] args)
    {
        IFunctions functions = GetFunctions(functionName);

        if (functions != null)
        {
            return(functions.Call <T>(functionName, args));
        }
        else
        {
            Debug.ULogChannel(ModFunctionsLogChannel, "'" + functionName + "' is not a LUA nor CSharp function!");
            return(default(T));
        }
    }
Пример #2
0
    private DynValue Call(string functionName, bool throwError, params object[] args)
    {
        IFunctions functions = GetFunctions(functionName);

        if (functions != null)
        {
            return(functions.Call(functionName, args));
        }
        else
        {
            UnityDebugger.Debugger.Log(ModFunctionsLogChannel, "'" + functionName + "' is not a LUA nor is it a CSharp function!");

            if (throwError)
            {
                throw new Exception("'" + functionName + "' is not a LUA nor is it a CSharp function!");
            }

            return(null);
        }
    }