public object Call(Func <object> func)
        {
            var taskToRun = new FuncToRunOnGameLoop(func, m_log);

            m_functions.Enqueue(taskToRun);
            Task.Yield();
            return(taskToRun.Take().ReturnOrThrow());
        }
        public dynamic Enqueue(Func <dynamic> func)
        {
            var taskToRun = new FuncToRunOnGameLoop(func, m_log);

            m_functions.Enqueue(taskToRun);
            Task.Yield();
            return(taskToRun.Take().ReturnOrThrow());
        }
        public async Task <dynamic> EnqueueAsync(Func <dynamic> func)
        {
            var functionToRun = new FuncToRunOnGameLoop(func, m_log);

            m_functions.Enqueue(functionToRun);
            await Task.Yield();

            return(functionToRun.Take().ReturnOrThrow());
        }