GE Lua Documentation

Press F to search!

onUpdate

Definition


-- @/lua/ge/extensions/ui/console.lua:556
local function onUpdate(dtReal, dtSim, dtRaw)
  if windowOpen[0] ~= true then
    if previouslyShown ~= nil then
      setVehicleControlActive(true)
    end
    previouslyShown = nil
    return
  end
  local mustFocusKeyboard = focusOnShow[0] and not previouslyShown
  if not previouslyShown then
    setVehicleControlActive(enableVehicleControls)
  end
  previouslyShown = true
  -- local tim = hptimer()

  if im.IsKeyReleased(112) then --scroll lock
    paused = not paused
  end

  if not paused then
    local flog = Engine.getFrameLog()
    if flog and #flog then
      for _,l in ipairs(flog) do
        onConsoleLog(l[1],l[2],l[3],l[4])
      end
    end
  end

  local uiScale = 1
  if editor and editor.getPreference and editor.getPreference("ui.general.scale") then
    uiScale = editor.getPreference("ui.general.scale")
  else
    uiScale = ui_imgui.GetIO().FontGlobalScale
  end

  im.SetNextWindowSize(initialWindowSize, im.Cond_FirstUseEver)
  if fullscreen then
    local vspace = im.GetMainViewport()
    im.SetNextWindowPos(vspace.Pos, im.ImGuiCond_Always)
    im.SetNextWindowSize(vspace.Size, im.ImGuiCond_Always)
    -- im.SetNextWindowFocus()
    im.SetNextWindowBgAlpha(winBgAlpha[2][0])
  else
    im.SetNextWindowBgAlpha(winBgAlpha[1][0])
  end
  if( im.Begin(winTitle, windowOpen, im.WindowFlags_MenuBar + (fullscreen and (im.WindowFlags_NoResize+im.WindowFlags_NoMove+im.WindowFlags_NoCollapse+im.WindowFlags_NoDocking+im.WindowFlags_NoTitleBar) or 0) ) ) then
    menuToolbar(uiScale)

    local imgsize = (im.CalcTextSize("yes_texture.dds").y + im.GetStyle().FramePadding.y * 2) / uiScale

    if gui.uiIconImageButton(gui.icons.error, {x=imgsize, y=imgsize}, levelFilter.E and iconColors.E.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      levelFilter.E = not levelFilter.E
    end
    im.tooltip("Error")
    im.SameLine()

    if gui.uiIconImageButton(gui.icons.warning, {x=imgsize, y=imgsize}, levelFilter.W and iconColors.W.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      levelFilter.W = not levelFilter.W
    end
    im.tooltip("Warning")
    im.SameLine()

    if gui.uiIconImageButton(gui.icons.info, {x=imgsize, y=imgsize}, levelFilter.I and iconColors.I.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      levelFilter.I = not levelFilter.I
    end
    im.tooltip("Info")
    im.SameLine()

    if gui.uiIconImageButton(gui.icons.bug_report, {x=imgsize, y=imgsize}, levelFilter.D and iconColors.D.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      levelFilter.D = not levelFilter.D
    end
    im.tooltip("Debug")
    im.SameLine()

    if gui.uiIconImageButton(gui.icons.help, {x=imgsize, y=imgsize}, levelFilter.A and iconButtonFgColor.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      levelFilter.A = not levelFilter.A
    end
    im.tooltip("Other")
    im.SameLine()

    im.Spacing()
    im.SameLine()

    local vehicleButtonBgColor = im.GetStyleColorVec4(im.Col_Button)
    if gui.uiIconImageButton(gui.icons.directions_car,{x=imgsize, y=imgsize}, enableVehicleControls and iconButtonFgColor.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      if not enableVehicleControls then
        enableVehicleControls = true
      else
        enableVehicleControls = false
      end
      setVehicleControlActive(enableVehicleControls)
      settingsSave()
    end
    im.tooltip("Enable Vehicle control while Console window is open")
    im.SameLine()

    if gui.uiIconImageButton(gui.icons.vertical_align_bottom, {x=imgsize, y=imgsize}, forceAutoScroll and iconButtonFgColor.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
      forceAutoScroll = not forceAutoScroll
    end
    im.tooltip("Force scroll bar down")
    im.SameLine()

    im.Spacing()
    im.SameLine()

    im.TextUnformatted("Filter(s):")
    im.SameLine()
    im.ShowHelpMarker(helpstr, false) --broken, goes billow text
    im.SameLine()
    -- im.TextUnformatted("(?)")
    --im.tooltip(helpstr)

    -- invalidOriginFilter = checkPattern(ffi.string(originFilterImC))
    -- im.PushItemWidth(260)
    im.TextUnformatted("Origin")
    im.SameLine()
    if invalidOriginFilter then
      im.PushStyleColor2(im.Col_FrameBg, im.ImColorByRGB(255,0,0,255).Value)
    end
    gui.uiInputSearch(nil, originFilterImC, 260 * uiScale)
    -- im.InputText('Origin Filter', originFilterImC, nil)
    if invalidOriginFilter then
      im.SameLine()
      im.TextColored(im.ImVec4(1.0, 0.0, 0.0, 1.0), tostring(filterErr) )
      im.PopStyleColor()
    end

    local numColm = 4
    im.PushStyleVar2(im.StyleVar_FramePadding,im.ImVec2(0,0))
    im.PushStyleColor2(im.Col_ChildBg, im.ImColorByRGB(0,0,0,0).Value)
    if im.BeginTable("LogsChild", numColm, im.TableFlags_Resizable+im.TableFlags_ContextMenuInBody+im.TableFlags_ScrollY+im.TableFlags_NoPadInnerX+im.TableFlags_BordersOuter+(tableBgLines[0] and im.TableFlags_RowBg or 0 )+im.TableFlags_Hideable, im.ImVec2(0, -30 * uiScale)) and numColm>0 then
      im.SetWindowFontScale(fontConsoleFact[0])
      im.TableSetupColumn("time", im.TableColumnFlags_NoSort + im.TableColumnFlags_WidthStretch,10)
      im.TableSetupColumn("level", im.TableColumnFlags_NoSort + im.TableColumnFlags_WidthStretch,5)
      im.TableSetupColumn("origin", im.TableColumnFlags_NoSort + im.TableColumnFlags_WidthStretch,20)
      im.TableSetupColumn("message", im.TableColumnFlags_NoSort + im.TableColumnFlags_WidthStretch, 50)

      -- im.TableHeadersRow()


      filterCur = dumps(levelFilter) .. ffi.string(originFilterImC)
      if filterCur ~= filterOld then
        filterOld = filterCur
        runFilter()
        interestingLines = {}
      end

      local fontPushed = im.PushFont3("robotomono_regular")

      -- for _,l in ipairs(logs) do
      --   if type(l) == "string" then
      --     im.NextColumn()
      --     im.NextColumn()
      --     im.NextColumn()
      --     im.TextUnformatted(l)
      --     im.NextColumn()
      --   else
      --     local lcol = colors[l[2]] or im.ImVec4(1,1,1,1)
      --     local f = levelFilter[l[2]]
      --     if f or (f==nil and levelFilter.A) then
      --       for i,v in ipairs(l) do
      --         im.TextColored(lcol,"%s",tostring(v) )
      --         im.NextColumn()
      --       end
      --     end
      --   end
      --   -- im.Separator()
      --   --im.NewLine()
      -- end

      --------------------------------------------------------------------------------
      --          OLD Ver Print everything
      --------------------------------------------------------------------------------
      -- for _,l in ipairs(logFiltered) do
      --   if type(l) == "string" then
      --     if viewColumn.time[0] then
      --       im.NextColumn()
      --     end
      --     if viewColumn.level[0] then
      --       im.NextColumn()
      --     end
      --     if viewColumn.origin[0] then
      --       im.NextColumn()
      --     end
      --     if viewColumn.msg[0] then
      --       im.TextUnformatted(l)
      --       im.NextColumn()
      --     end
      --   else
      --     local lcol = colors[l[2]] or im.ImVec4(1,1,1,1)
      --     for i,v in ipairs(l) do
      --       if (i == 1 and not viewColumn.time[0])
      --         or (i == 2 and not viewColumn.level[0])
      --         or (i == 3 and not viewColumn.origin[0])
      --         or (i == 4 and not viewColumn.msg[0])
      --         then goto continue_skipcol end

      --       im.TextColored(lcol,"%s",tostring(v) )
      --       if v ~= 2 and im.GetContentRegionAvailWidth() < im.CalcTextSize(tostring(v)).x then
      --         im.tooltip(tostring(v))
      --       end
      --       im.NextColumn()
      --       ::continue_skipcol::
      --     end
      --   end
      -- end

      --------------------------------------------------------------------------------
      --          virtualScroll table
      --------------------------------------------------------------------------------
      -- local displayStart = im.IntPtr(0)
      -- local displayEnd = im.IntPtr(0)
      -- local lines_height = math.floor( im.GetFontSize() + im.GetStyle().ItemSpacing.y )
      -- local lines_count = logsTail - (logsHead+1)
      -- im.CalcListClipping(lines_count, lines_height, displayStart, displayEnd);
      -- im.SetCursorPosY(im.GetCursorPosY() + (displayStart[0] * lines_height));
      -- for i = displayStart[0],displayEnd[0] do
      --   -- im.TextUnformatted(tostring(i))
      --   local l = logs[i+logsHead]
      --   if not l then
      --     -- print( string.format("head = %d\ttail=%d\ti=%d",logsHead,logsTail , i   ))
      --     goto continue_skipline
      --   end
      --   if type(l) == "string" then
      --     if viewColumn.time[0] then
      --       im.NextColumn()
      --     end
      --     if viewColumn.level[0] then
      --       im.NextColumn()
      --     end
      --     if viewColumn.origin[0] then
      --       im.NextColumn()
      --     end
      --     if viewColumn.msg[0] then
      --       im.TextUnformatted(l)
      --       im.NextColumn()
      --     end
      --   else
      --     local lcol = colors[l[2]] or im.ImVec4(1,1,1,1)
      --     for i,v in ipairs(l) do
      --       if (i == 1 and not viewColumn.time[0])
      --         or (i == 2 and not viewColumn.level[0])
      --         or (i == 3 and not viewColumn.origin[0])
      --         or (i == 4 and not viewColumn.msg[0])
      --         then goto continue_skipcol end

      --       im.TextColored(lcol,"%s",tostring(v) )
      --       if v ~= 2 and im.GetContentRegionAvailWidth() < im.CalcTextSize(tostring(v)).x then
      --         im.tooltip(tostring(v))
      --       end
      --       im.NextColumn()
      --       ::continue_skipcol::
      --     end
      --   end
      --   ::continue_skipline::
      -- end
      -- im.SetCursorPosY(im.GetCursorPosY() + ((lines_count - displayEnd[0]) * lines_height));
      local displayStart = im.IntPtr(0)
      local displayEnd = im.IntPtr(0)
      local lines_height = math.ceil(im.GetTextLineHeightWithSpacing()) --round up else last line is not displayed
      local lines_count = #logFiltered
      local offset = 0
      local filidx = ""
      local idxfilter ={}

      -- for k,v in pairs(logFiltered) do
      --   lines_count = lines_count+1
      --   filidx = filidx..dumps(k)..","
      --   table.insert(idxfilter,k)
      -- end
      -- table.sort(idxfilter)
      -- print("---------------------------------------")
      -- im.CalcListClipping(lines_count, lines_height, displayStart, displayEnd);
      -- print("cursorY="..dumps(im.GetCursorPosY()).."\tset="..dumps((im.GetCursorPosY() + (displayStart[0]*2 * lines_height))))
      -- im.SetCursorPosY(im.GetCursorPosY() + (displayStart[0]*2 * lines_height));
      -- print("lcount="..lines_count.."\t"..dumps(displayStart[0]).."-"..dumps(displayEnd[0]).."\tlen="..dumps(displayEnd[0]-displayStart[0]))

      local listClip = im.ImGuiListClipper()
      im.ImGuiListClipper_Begin(listClip,lines_count,lines_height)

      --necesary for the ImGui api, else first text won't be displayed
      im.TableNextRow()

      while(im.ImGuiListClipper_Step(listClip)) do
        for i = listClip.DisplayStart,listClip.DisplayEnd,1 do
          interestingLines["currentDisplayLines"] = {listClip.DisplayStart,listClip.DisplayEnd}
          -- im.TextUnformatted(tostring(i))
          -- ::looklineagain::
          -- if not logFiltered[i+logsHead+offset] then
          --   local tmp
          --   for k,v in pairs(logFiltered) do
          --     if type(v) == number and (i+logsHead+offset) >k and (i+logsHead+offset)<=v then tmp = true; print("brk");break; end
          --   end
          --   if not tmp and offset < logsTail then offset = offset+1; goto looklineagain end
          --   --if not tmp or offset > lines_count then goto continue_skipline end
          -- end
          -- -- print("logsHead="..dumps(logsHead).."\toffset="..dumps(offset))
          -- prtidx = prtidx .. dumps(i+logsHead+offset)..","
          -- local l = logs[i+logsHead+offset]

          local l = logs[logFiltered[i+1]]
          -- prtidx = prtidx .. dumps(idxfilter[i+1])..","
          if not l then
            -- print( string.format("head = %d\ttail=%d\ti=%d",logsHead,logsTail , i   ))
            -- if viewColumn.time[0] then
            --   im.TableNextColumn()
            -- end
            -- if viewColumn.level[0] then
            --   im.TableNextColumn()
            -- end
            -- if viewColumn.origin[0] then
            --   im.TableNextColumn()
            -- end
            -- if viewColumn.msg[0] then
            --   im.TableNextColumn()
            -- end
            goto continue_skipline
          end
          if type(l) == "string" then
            -- if viewColumn.time[0] then
            --   im.TableNextColumn()
            -- end
            -- if viewColumn.level[0] then
            --   im.TableNextColumn()
            -- end
            -- if viewColumn.origin[0] then
            --   im.TableNextColumn()
            -- end
            if viewColumn.msg[0] then
              im.TableSetColumnIndex(numColm-1)
              im.TextUnformatted(l)
            end
          else
            local lcol = colors[l[2]] or im.ImVec4(1,1,1,1)
            for i,v in ipairs(l) do
              -- if (i == 1 and not viewColumn.time[0])
              --   or (i == 2 and not viewColumn.level[0])
              --   or (i == 3 and not viewColumn.origin[0])
              --   or (i == 4 and not viewColumn.msg[0])
              --   then goto continue_skipcol end
              im.TableSetColumnIndex(i-1)

              -- im.TextColored(lcol,"%s",tostring(v))
              local txtwidth = im.CalcTextSize(tostring(v)).x
              if v ~= 2 and im.GetContentRegionAvailWidth() < txtwidth then
                im.TextColored(lcol,string.format("%s", tostring(v):sub(1,256) ))
                txtwidth = txtwidth * (1/fontConsoleFact[0])
                local vp = im.GetWindowViewport()
                local chunkSize = tostring(v):len() * vp.Size.x / txtwidth
                if txtwidth > vp.Size.x or tostring(v):len()>chunkSize then
                  local bt = tostring(v)
                  local chunk = ""
                  while(bt:len() > chunkSize and chunk:len() < 2048) do
                    chunk = chunk..bt:sub(1,chunkSize).."\n"
                    bt = bt:sub(chunkSize+1)
                  end
                  if bt:len() < chunkSize then
                    chunk = chunk..bt
                  else
                    chunk = chunk.."\n...\nToo long to display, check the log file"
                    --chunk = chunk.."\nlsize="..tostring(v):len()
                  end
                  if tooltipOnLongTxt[0] then
                    im.tooltip(chunk)
                  end
                else
                  if tooltipOnLongTxt[0] then
                    im.tooltip(tostring(v))
                  end
                end
              else
                im.TextColored(lcol, "%s", tostring(v))
              end
              im.TableNextColumn()
              ::continue_skipcol::
            end
          end
          ::continue_skipline::
        end
      end


      if forceAutoScroll or (scroll2Bot and scrollMaxPrev ~= im.GetScrollMaxY() ) then
        im.SetScrollY(im.GetScrollMaxY())
      end
      scroll2Bot = im.GetScrollMaxY() == im.GetScrollY()
      if scroll2Bot then
        scrollMaxPrev = im.GetScrollMaxY()
      end

      if fontPushed then
        im.PopFont()
        --im.SetWindowFontScale(1)
      end
      im.SetWindowFontScale(1.0)
      im.EndTable()
    end

    im.PopStyleVar()
    im.PopStyleColor()

    if true then
      local flags = 0
      flags = flags + im.InputTextFlags_EnterReturnsTrue
      flags = flags + im.InputTextFlags_CallbackCompletion
      flags = flags + im.InputTextFlags_CallbackHistory
      flags = flags + im.InputTextFlags_CallbackCharFilter

      im.PushItemWidth(200 * uiScale)
      if im.Combo2("##cmdctx", comboCurrentItem, comboCtxTxt) then
        --print("context changed")
      end
      im.SameLine()

      if mustFocusKeyboard then im.SetKeyboardFocusHere() end
      im.PushItemWidth(im.GetContentRegionAvailWidth() - 70 * uiScale)
      local exec = im.InputText("##inputText", consoleInputField, im.ArraySize(consoleInputField), flags, ffi.C.ImGuiInputTextCallbackLua, "ConsoleInputCallback")


      im.SameLine()
      im.PushItemWidth(40 * uiScale)
      exec = exec or im.SmallButton("execute")
      if exec then
        previouslyShown = nil
        local cmd = ffi.string(consoleInputField)
        if string.len(cmd) > 0 then

          --print("> history 1 = " .. dumps(history))
          if history[historyPos] ~= cmd then
            table.insert(history, cmd)
          else
            -- move element to the end
            shiftTableEntry(history, historyPos, #history)
          end
          --print("> history 2 = " .. dumps(history))
          historyPos = -1

          --print(" CMD = " .. tostring(cmd))
          if comboCurrentItem[0] == 0 then
            --table.insert(console_log_buffer, {'i', "> " .. tostring(cmd)})
            if sandboxCmd[0] then
              log("I", "exec", "GELua(Sandboxed) < "..dumps(cmd))
              local res, out = executeLuaSandboxed(cmd, 'GEConsole')
              --print(" RES = " .. tostring(res))
              --print(" OUT = " .. dumps(out))
              if res then
                --table.insert(console_log_buffer, {'r', tostring(res)})
                if type(res)=="string" and res:sub(1,7)== "Error: " then
                  log("E", "exec", res)
                else
                  log("I", "exec", "return > "..dumps(res))
                end
              end
              if out and #out > 0 then
                for _, le in ipairs(out) do
                  --table.insert(console_log_buffer, {'o', tostring(le)})
                  print(le)
                end
              end
            else

              local hex_dump = function (str)
                local len = string.len( str )
                local dump = ""
                local hex = ""
                local asc = ""

                for i = 1, len do
                    if 1 == i % 8 then
                        dump = dump .. hex .. asc .. "\n"
                        hex = string.format( "%04x: ", i - 1 )
                        asc = ""
                    end

                    local ord = string.byte( str, i )
                    hex = hex .. string.format( "%02x ", ord )
                    if ord >= 32 and ord <= 126 then
                        asc = asc .. string.char( ord )
                    else
                        asc = asc .. "."
                    end
                end


                return dump .. hex
                        .. string.rep( "   ", 8 - len % 8 ) .. asc
            end

              log("I", "exec", "GELua(Queue) hex_dump="..hex_dump(cmd))
              log("I", "exec", "GELua(Queue) < "..dumps(cmd))
              Lua:queueLuaCommand(cmd)
            end
          elseif comboCurrentItem[0] == 1 then
            if not cmd:find(";[\n\r\t ]-$") then cmd = cmd..";" end --append semi-colon if missing
            log("I", "exec", "GE TS < "..dumps(cmd))
            TorqueScript.eval(cmd)
          elseif comboCurrentItem[0] == 2 then
            log("I", "exec", "GE UI < "..dumps(cmd))
            be:queueJS(cmd)
          else
            local vid = vehIds[comboCurrentItem[0]-2]
            if not vid then log("E","exec","Selected vehicle invalid");refreshCombo();goto skipcmd end
            local v = getObjectByID(vid)
            if not v then log("E","exec","Selected vehicle dosn't exist");refreshCombo();goto skipcmd end
            log("I", "exec", "veh "..tostring(vid).." < "..dumps(cmd))
            v:queueLuaCommand(cmd)
          end

          ffi.fill(consoleInputField, im.ArraySize(consoleInputField))

          while(#history > 20) do
            table.remove(history, 1)
          end

          jsonWriteFile(historyPath, history, true)

          --im.SetItemDefaultFocus()
          --im.SetKeyboardFocusHere(-1)
          ::skipcmd::
        end
      end
    end

  end


  im.End() --Begin
  -- log("D","stats", "#logs="..dumps(#logs).." | #logFiltered="..dumps(#logFiltered).. " | update "..dumps(tim:stopAndReset()))
  -- rollAvgAppend(rollAvgUpdate, tim:stopAndReset())


  ----------------------------------------------------


  -- im.SetNextWindowSize(initialWindowSize, im.Cond_FirstUseEver)
  -- if( im.Begin("test", windowOpen, im.WindowFlags_MenuBar ) ) then
  --   menuToolbar(uiScale)
  --   local imgsize = (im.CalcTextSize("yes_texture.dds").y + im.GetStyle().FramePadding.y * 2) / uiScale

  --   -- if gui.uiIconImageButton(gui.icons.error, {x=imgsize, y=imgsize}, levelFilter.E and iconColors.E.Value or iconButtonNoColor.Value, nil, iconButtonBgColor.Value) then
  --   --   nop()
  --   -- end
  --   -- im.tooltip("Error")
  --   -- im.SameLine()

  --   local numColm = 3
  --   im.PushStyleVar2(im.StyleVar_FramePadding,im.ImVec2(0,0))
  --   if im.BeginTable("testtable", numColm, im.TableFlags_Resizable+im.TableFlags_ContextMenuInBody+im.TableFlags_ScrollY+im.TableFlags_NoPadInnerX+im.TableFlags_BordersOuter+im.TableFlags_RowBg, im.ImVec2(0, 0)) and numColm>0 then
  --     im.SetWindowFontScale(fontConsoleFact[0])

  --     if im.IoFontsGetCount and im.IoFontsGetCount()>1 then
  --       im.PushFont2(1)
  --       --im.SetWindowFontScale(1)
  --     end

  --     local displayStart = im.IntPtr(0)
  --     local displayEnd = im.IntPtr(0)
  --     -- local lines_height = im.GetTextLineHeightWithSpacing() --math.floor( im.GetFontSize() + im.GetStyle().ItemSpacing.y ) + 0--10px spacing table
  --     local lines_height = math.ceil(im.GetTextLineHeightWithSpacing())
  --     local lines_count = 64

  --     im.TableNextRow()
  --     -- im.TableNextColumn()
  --     -- im.TableSetColumnIndex(0)
  --     -- im.CalcListClipping(lines_count, lines_height, displayStart, displayEnd);

  --     local listClip = im.ImGuiListClipper()
  --     im.ImGuiListClipper_Begin(listClip,lines_count,lines_height)
  --     print("----------")
  --     print("lH="..dumps(lines_height).."\tframeH="..dumps(im.GetFrameHeightWithSpacing()))
  --     while(im.ImGuiListClipper_Step(listClip)) do
  --       print(dumps(listClip.DisplayStart).."--"..dumps(listClip.DisplayEnd))
  --       for i = listClip.DisplayStart,listClip.DisplayEnd,1 do
  --         for j=1,numColm,1 do
  --           im.TableSetColumnIndex(j-1)
  --           im.TextUnformatted("data["..dumps(j).."]["..dumps(i).."]")
  --         end
  --         im.TableNextRow()
  --       end
  --     end

  --     if forceAutoScroll or (scroll2Bot and scrollMaxPrev ~= im.GetScrollMaxY() ) then
  --       im.SetScrollY(im.GetScrollMaxY())
  --     end



  --     -- for i = displayStart[0],displayEnd[0],1 do
  --     --   for j=1,numColm,1 do
  --     --     im.TableSetColumnIndex(j-1)
  --     --     im.TextUnformatted("data["..dumps(j).."]["..dumps(i).."]")
  --     --   end
  --     --   im.TableNextRow()
  --     -- end

  --     if im.IoFontsGetCount and im.IoFontsGetCount()>1 then
  --       im.PopFont()
  --       --im.SetWindowFontScale(1)
  --     end
  --     im.SetWindowFontScale(1.0)
  --     im.EndTable()
  --   end
  --   im.PopStyleVar()
  -- end
  -- im.End() --Begin


end

Callers

@/lua/ge/extensions/editor/meshEditor.lua

local function onUpdate()
  hoveredMeshID = nil
@/lua/ge/extensions/tech/platoonFunctions.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  local distance
@/lua/ge/extensions/gameplay/drift/stuntZones/donut.lua

function C:onUpdate()
  self:sendDecals()
@/lua/ge/extensions/core/vehicle/mirror.lua

local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePropTransformer.lua

local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/career/modules/delivery/parcelManager.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not dGeneral then return end
@/lua/ge/extensions/core/flowgraphManager.lua

local function onUpdate()
  for _, mgr in ipairs(managers) do
@/lua/ge/extensions/core/environment.lua

local function onUpdate()
  local levelInfo = getObject("LevelInfo")
@/lua/ge/extensions/ui/apps/genericMissionData.lua

  local function onUpdate()
    if not im then return end
@/lua/ge/extensions/editor/mainUpdate.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if editor.active then
    if editor.editMode and editor.editMode.onUpdate then
      editor.editMode.onUpdate(dtReal, dtSim, dtRaw)
    end
@/lua/ge/extensions/gameplay/crawl/general.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if M.activeTrail then
@/lua/ge/extensions/gameplay/rally/loop/rallyLoopManager.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("rallyLoopManager:onUpdate")
  if self.roadSectionPenaltyKeeper then
    self.roadSectionPenaltyKeeper:onUpdate()
  end
@/lua/ge/extensions/editor/gen/network.lua

local function onUpdate()
--    pathsUp()
@/lua/ge/extensions/freeroam/crashCamMode.lua

local function onUpdate(dtReal, dtSim)
  if not crashCamEnabled and not forcedEnabled then return end
@/lua/ge/extensions/gameplay/police.lua

local function onUpdate(dt, dtSim)
  if not M.enabled or not be:getEnabled() then return end
@/lua/ge/extensions/career/modules/inspectVehicle.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not testDriveVehInfo then return end
@/lua/ge/extensions/ui/cameraDistanceApp.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  -- TODO: convert into stream
@/lua/ge/extensions/core/quickAccess.lua

local function onUpdate()
  -- logic for the menu assembling timeout
@/lua/ge/extensions/gameplay/drift/stallingSystem.lua

local function onUpdate()
  imguiDebug()
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
-- shows either the main window, the drive window or nothing when a screenshot is taken.
local function onUpdate()
@/lua/ge/extensions/gameplay/drag/dragTypes/headsUpDrag.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if hasActivityStarted then
@/lua/ge/extensions/flowgraph/baseModule.lua
function C:clear() end
function C:onUpdate(dtReal, dtSim, dtRaw) end
function C:executionStopped() end
@/lua/ge/extensions/core/jobsystem.lua
local dtTable = {dtReal = 0, dtSim = 0, dtRaw = 0}
local function onUpdate(dtReal, dtSim, dtRaw)
  dtTable.dtReal = dtReal
@/lua/ge/extensions/gameplay/missions/missionTypes/flowMission.lua
-- update each frame
function C:onUpdate(dtReal, dtSim, dtRaw)
  --self.mgr:broadcastCall('onUpdate', dtReal, dtSim, dtRaw)
  if self.script and self.script.onUpdate then
    self.script:onUpdate(dtReal, dtSim, dtRaw)
  end
@/lua/ge/extensions/gameplay/drift/freeroam/driftSpots.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  isBeingDebugged = gameplay_drift_general.getExtensionDebug("gameplay_drift_freeroam_driftSpots")
@/lua/ge/extensions/core/audioRibbon.lua
-- Frame update
local function onUpdate(dtReal, dtSim, dtRaw)
  if not ribbons or #ribbons < 1 then
@/lua/ge/extensions/core/vehicleTriggers.lua
local hoveredTriggerId = {}
local function onUpdate(dtReal, dtSim, dtRaw)
  if debugUIEnabled then
@/lua/ge/extensions/gameplay/traffic.lua
    if veh then
      veh:onUpdate(dt, dtSim)

local function onUpdate(dtReal, dtSim)
  if state == 'loading' then
@/lua/ge/extensions/core/dynamicProps.lua
local locationInfo
function DynamicProps:onUpdate()

local function onUpdate()
  cameraPos = core_camera.getPosition()
  for i = 1, #dynamicPropsObjs, 1 do
    dynamicPropsObjs[i]:onUpdate()
  end
@/lua/ge/extensions/gameplay/drift/general.lua

local function onUpdate()
  imguiDebug()
@/lua/ge/extensions/freeroam/freeroam.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if worldReadyState == 0 then
@/lua/ge/extensions/gameplay/drift/bounds.lua

local function onUpdate()
  isBeingDebugged = gameplay_drift_general.getExtensionDebug("gameplay_drift_bounds")
@/lua/ge/extensions/gameplay/crashTest/crashTestCountdown.lua

local function onUpdate(dtReal, dtSim)
  if timer > 0 then
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamBeautifier.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/crashTest/crashTestBoundaries.lua

local function onUpdate()
  checkOutOfBounds(be:getPlayerVehicleID(0))
@/lua/ge/extensions/core/chat.lua

local function onUpdate()
  --log('D', 'chat', 'onUpdate')
@/lua/ge/extensions/gameplay/rally/tools/devTools.lua

function C:onUpdate()
  -- Only draw debug visualizations when the Pacenotes Tools section is expanded

  --   self.drivelineRoute:onUpdate()
  --   self.drivelineRoute:drawDebugDrivelineRoute()
@/lua/ge/extensions/gameplay/traffic/roles/suspect.lua

function C:onUpdate(dt, dtSim)
end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePowerTrain.lua

local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/input/vibrationDebug.lua

local function onUpdate()
  imgui.Begin("Vibration Debug")
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veAeroDebug.lua

local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/parking.lua
local vehPos = vec3()
local function onUpdate(dt, dtSim)
  if not active or not sites or not be:getEnabled() or freeroam_bigMapMode.bigMapActive() then return end
@/lua/ge/extensions/util/stepHandler.lua
local dtTable = {}
local function onUpdate(dtReal, dtSim, dtRaw)
  if showDebugWindow then
@/lua/ge/extensions/c2/webSocketHandler.lua

local function onUpdate(dt)
  if not server then return end
@/lua/ge/extensions/gameplay/rally/audioManager.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("AudioManager - onUpdate")
@/lua/ge/extensions/career/modules/partInventory.lua
local addNewVehiclePartsInventoryId
local function onUpdate()
  -- Add a new vehicles' parts to the inventory
@/lua/ge/extensions/career/modules/vehicleShopping.lua
local currentUiState
local function onUpdate()
  if tableIsEmpty(vehicleWatchlist) or (currentUiState and currentUiState ~= "play") then return end
@/lua/ge/extensions/core/trafficSignals.lua

local function onUpdate(dt, dtSim)
  if not loaded then return end
@/lua/ge/extensions/core/remoteController.lua

local function onUpdate()
  -- TODO: move to 1 fps
@/lua/ge/extensions/freeroam/specialTriggers.lua

local function onUpdate(dt, dtSim)
  if not next(triggers) then return end
@/lua/ge/extensions/ui/extApp.lua

local function onUpdate()
  if not server then return end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veLightsDebug.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/vehicle/partmgmt.lua

local function onUpdate(dt)
  if partsSelectorChangedTime then
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamSpellchecker.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/editor/raceEditor/testing.lua
  elseif self.state == 'race' then
    self.race:onUpdate(dt)
    self:drawRace()
@/lua/common/extensions/ui/improfiler.lua

function M.onUpdate(dtReal, dtSim, dtRaw)
  if im.Begin("LuaJIT Profiler", windowOpen) then
@/lua/ge/extensions/flowgraph/manager.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  self.frameCount = self.frameCount + 1
  for _, mod in ipairs(self.moduleOrder) do
    self.modules[mod]:onUpdate(dtReal, dtSim, dtRaw)
  end
@/lua/ge/extensions/editor/missionStartPositionEditor.lua

local function onUpdate()
  -- Get all missions in the current level
@/lua/ge/extensions/core/vehicle/manager.lua

local function onUpdate()
  spawn.clearCache()
@/lua/ge/extensions/gameplay/garageMode.lua

local function onUpdate(dtReal)
  if not active then return end
@/lua/ge/extensions/util/groundModelDebug.lua
local axisToDraw = false -- x axis, vs y axis
local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/forceField.lua
local lastUpdateTimer = updateTime
local function onUpdate(dtReal, dtSim, dtRaw)
  lastUpdateTimer = lastUpdateTimer + dtSim
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veAdjustableTechCarTuner.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/gameplay/missions/italy/arrive/012-Field/script.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  if not self.readyFlag then
@/lua/ge/extensions/gameplay/drift/drift.lua

local function onUpdate(dtReal, _dtSim, dtRaw)
  dtSim = _dtSim
@/lua/ge/extensions/tech/adasUltrasonic.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not loaded then
@/lua/ge/extensions/career/modules/insurance/insurance.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not gameplay_missions_missionManager.getForegroundMissionId() and not gameplay_walk.isWalking() and activeInsuranceId > 0 then -- we don't track when in a mission
@/lua/ge/extensions/career/modules/vehiclePerformance.lua

local function onUpdate(dtReal)
  updateCameraZoom(dtReal)
@/lua/ge/extensions/render/openxr.lua
local logStatePending = false
local function onUpdate(dtReal, dtSim, dtRaw)
  if logStatePending then
@/lua/ge/extensions/editor/roadEditor.lua

local function onUpdate()
  local rayCastHit
@/lua/ge/extensions/career/modules/fuel.lua
local uiFuelDataDeltaCounter = 0
local function onUpdate(dtReal, dtSim)
  if showUI then
@/lua/ge/extensions/tech/utils.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not tech_license.isValid(path) then return end
@/lua/ge/extensions/career/modules/tether.lua
local remove = false
local function onUpdate()
  for _, t in ipairs(tethers) do
@/lua/ge/extensions/career/modules/vehicleDeletionService.lua
local camDir = vec3()
local function onUpdate()
  for vehId, data in pairs(flaggedVehicles) do
@/lua/ge/extensions/ui/messagesTasksAppContainers.lua

local function onUpdate()
  if not debug or not im then
@/lua/ge/extensions/career/modules/marketplace.lua
local timeSinceUpdate = 0
local function onUpdate(dtReal, dtSim, dtRaw)
  if tableIsEmpty(listedVehicles) or offerMenuOpen then
@/lua/ge/extensions/flowgraph/modules/timerModule.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  self.globalTime.real = self.globalTime.real + dtReal
@/lua/ge/extensions/ui/gameplayAppContainers.lua
-- Update function for dtSim timer accumulation and queue processing
local function onUpdate(dtReal, dtSim, dtRaw)
  -- Process current flash message timer using dtSim (pauses with game simulation)
@/lua/ge/extensions/gameplay/rally/geometry.lua
local pacenotes = nil
local function onUpdate(dt, dtSim)
  if core_groundMarkers.currentlyHasTarget() then
@/lua/ge/extensions/editor/buildingEditor.lua

local function onUpdate()
	W.onUpdate()
local function onUpdate()
	W.onUpdate()
			if not ishit then
--                D.onUpdate()
			end
	if U._PRD==0 and not ishit then
		D.onUpdate()
		R.onUpdate({D = D, W = W})
		D.onUpdate()
		R.onUpdate({D = D, W = W})
	end
@/lua/ge/extensions/gameplay/crawl/utils.lua
  if core_lapTimes then
    core_lapTimes.onUpdate(0, dtSim, 0)
  end
@/lua/ge/extensions/gameplay/drift/scoring.lua

local function onUpdate(dtReal, _dtSim)
  dtSim = _dtSim
@/lua/ge/extensions/core/repository.lua

local function onUpdate(dt)
  if progressQueueDirty then
@/lua/ge/extensions/gameplay/traffic/roles/standard.lua

function C:onUpdate(dt, dtSim)
  if self.state == 'disabled' then return end
@/lua/ge/extensions/career/modules/delivery/vehicleTasks.lua
local toDeleteActiveTrailerIndexes = {}
local function onUpdate(dtReal, dtSim, dtRaw)
  taskThatChangedThisFrame = nil
@/lua/ge/extensions/gameplay/drag/times.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not dragData or not dragData.racers or dragData.isCompleted then return end
@/lua/ge/extensions/tech/ultrasonicTest.lua
-- Trigger execution to access the ultrasonic test class in every update cycle.
local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veFlexbodyDebug.lua

local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/fileRace.lua
      end
      self.race:onUpdate(self.mgr.dtSim)
    end
@/lua/ge/extensions/gameplay/crashTest/scenarioManager.lua

local function onUpdate(dtReal, dtSim)
  if not crashTestData.scenarioFinished then
@/lua/ge/extensions/util/vehicleRopeDebug.lua
-- Main update function
local function onUpdate(dt)
  -- Update performance statistics
@/lua/ge/extensions/tech/lidarTest.lua
-- Trigger execution to access the LiDAR test class in every update cycle.
local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/career/modules/spawnPoints.lua
local lastUpdateTimer = updateTime
local function onUpdate(dtReal, dtSim, dtRaw)
  -- Check if an undiscovered spawn point is close
@/lua/ge/extensions/remoteControl/remoteControl.lua
local timer = 0
local function onUpdate(dtReal, dtSim, dtRaw)
  timer = timer + dtReal
@/lua/ge/extensions/gameplay/drift/scoreboard.lua

local function onUpdate()
  if firstUpdateFrame then
@/lua/ge/extensions/campaign/exploration.lua
-- executed every frame, also when not rendering 3d in the menu
local function onUpdate()
  local campaign = campaign_campaigns and campaign_campaigns.getCampaign()
@/lua/ge/extensions/util/wsTest.lua

local function onUpdate()
  if not server then return end
@/lua/ge/extensions/editor/rallyEditor.lua
    devTools:draw()
    devTools:onUpdate() -- Call onUpdate to handle 3D debug drawing
  im.End()

-- local function onUpdate(dtReal, dtSim, dtRaw)
-- end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veNodeTriSelfCollisionDetector.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/ui/ui-vue/src/services/UINavScalarEventsHandler.js
    if (typeof onUpdate === "function") {
      onUpdate({ axis: newAxis, direction: newDirection, oldDirection })
    }
@/lua/ge/extensions/gameplay/rally/recceApp.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not enabled then return end
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamTableVis.lua

local function onUpdate(dt)
  if not vEditor.vehicle then return end
@/lua/ge/extensions/gameplay/drift/display.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  imguiDebug()
@/lua/ge/extensions/core/couplerCameraModifier.lua

local function onUpdate()
  local vehicleId = be:getPlayerVehicleID(0)
@/lua/ge/extensions/gameplay/drift/stuntZones/nearPole.lua

function C:onUpdate(dtReal, dtSim)
  if self.marker then
@/lua/ge/extensions/freeroam/bigMapMode.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not bigMap then return end
@/lua/ge/extensions/editor/gen/region.lua

local function onUpdate(inj)
	D = inj.D
@/lua/ge/extensions/gameplay/drift/stuntZones.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  pos:set(gameplay_drift_drift.getVehPos() or vec3(0,0,0))

      if stuntZone.onUpdate then stuntZone:onUpdate(dtReal, dtSim) end
@/lua/ge/extensions/gameplay/rally/loop/roadSectionPenaltyKeeper.lua

function C:onUpdate()
  local currentTime = self.manager.clock
@/lua/ge/extensions/gameplay/drift/sounds.lua

local function onUpdate(dtReal, _dtSim, dtRaw)
  dtSim = _dtSim
@/lua/ge/extensions/career/modules/testDrive.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not vehicleId then return end
@/lua/ge/extensions/career/modules/rentals.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if isRenting() then
@/lua/ge/extensions/gameplay/backgroundActivities/g2g.lua
local lastUpdateTimer = updateTime
local function onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/ui/messagesDebugger.lua
-- Draw the debug window
local function onUpdate(dtReal, dtSim, dtRaw)
  if not windowOpen[0] then return end
@/lua/ge/extensions/gameplay/drift/freeroam/cruising.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if gameplay_drift_general.getGeneralDebug() then profiler:start() end
@/lua/ge/extensions/gameplay/walk.lua
local vehPos = vec3()
local function onUpdate(dtReal, dtSim)
  local showMessage = false
@/lua/ge/extensions/gameplay/drag/dragTypes/bracketRace.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if hasActivityStarted then
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamModifierLeakVis.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/editor/gen/terrain.lua

local function onUpdate()
--        if true then return end
@/lua/ge/extensions/tech/sensors.lua

local function onUpdate(dtReal, dtSim, dtRaw)
        -- Send the data to the user's lua update callback.
        d.fileRef.onUpdate(
          dtSim,
@/lua/ge/extensions/editor/trafficManager.lua

local function onUpdate(dt, dtSim)
  if not session then return end
@/lua/ge/extensions/gameplay/drift/stuntZones/hitPole.lua

function C:onUpdate(dtReal, dtSim)
  if self.marker then
@/lua/ge/extensions/editor/vizHelper.lua

local function onUpdate()
  Engine.Render.DynamicDecalMgr.addDecals(savedDecals)
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veGeneralData.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/util/nodeStream.lua

local function onUpdate(dt)
  if not server then
@/lua/ge/extensions/editor/gen/world.lua

local function onUpdate()
		if _dbdrag then return end
	if U._PRD == 0 and out.R then
		out.R.onUpdate()
	end
	if U._PRD == 0 then
		N.onUpdate()
		done = M.onUpdate()
		N.onUpdate()
		done = M.onUpdate()
	end
		if Ter and not out.interr then
			out.interr = Ter.onUpdate()
			if out.interr then
		if editor.isWindowVisible('LAT') and D then
			local inroad = D.onUpdate()
			if inroad then
	elseif U._MODE == 'ter' and Ter and not out.interr then
		out.interr = Ter.onUpdate()
		if out.interr then return end
@/lua/ge/extensions/career/modules/logbook.lua

local function onUpdate()
  playedLogbookSoundThisFrame = false
@/lua/ge/extensions/core/schemeCommandServer.lua

local function onUpdate()
    if not udpSocket then return end
@/lua/ge/extensions/editor/audioEventsList.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not editor or not editor.beginWindow then return end
@/lua/ge/extensions/ui/apps/minimap/additionalInfo.lua

local function onUpdate()
  checkRoute()
@/lua/ge/extensions/ui/vehiclePaint.lua

local function onUpdate()
  if not showUI[0] then return end
@/lua/ge/extensions/flowgraph/modules/driftModule.lua

function C:onUpdate()
  for _, callbackData in pairs(self.callbacks) do
@/lua/ge/extensions/gameplay/race/race.lua

function C:onUpdate(dt)
  if not self.started then return end
@/lua/ge/extensions/core/versionUpdate.lua
local countdownWorkaround = 2
local function onUpdate()
  countdownWorkaround = countdownWorkaround - 1
@/lua/ge/extensions/gameplay/drag/debug.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if debugMenu then
@/lua/ge/extensions/core/multiseatCamera.lua

local function onUpdate()
  local i = 0
@/lua/ge/extensions/gameplay/missions/missionManager.lua
local debugApprove = false
local function onUpdate(dtReal, dtSim, dtRaw)
  if showDebugWindow then
      if mission._isOngoing then
        mission:onUpdate(dtReal, dtSim, dtRaw)
      end
@/lua/ge/extensions/flowgraph/modules/vehicleModule.lua

function C:onUpdate()
  for _, id in ipairs(self.sortedIds) do
@/gameplay/missionTypes/aiRace/customNodes/activateRaceNode.lua
    if not self.pinIn.idle.value then
      self.race:onUpdate(self.mgr.dtSim)
    end
@/lua/ge/extensions/render/viewDemo.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  timer = timer + dtSim
@/lua/ge/extensions/gameplay/statistic.lua

local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/editor/gen/decal.lua

local function onUpdate(rayCast)
--        lo('?? D.unUpd:')
@/lua/ge/extensions/core/metrics.lua
end
local function onUpdate(dtReal, dtSim, dtRaw)
  if M.currentMode == 0 then return end
@/lua/ge/extensions/tech/rawLidar.lua
-- This function is called in every frame, and contains the latest Raw LiDAR sensor readings.
local function onUpdate(dt, depth1, depth2, depth3, depth4, annot1, annot2, annot3, annot4)
    userDLL.bng_rawLidar_onUpdate(                                                                    -- Send the data to the user's .dll, in the per-frame update callback.
@/lua/ge/extensions/gameplay/missions/missionTypes/baseMission.lua
-- called each frame
function C:onUpdate(dtReal, dtSim, dtRaw) end
-- called when the activity stops. attempt might be nil
@/lua/ge/extensions/tech/rawLidarEmpty.lua
-- This function is called in every frame, and contains the latest Raw LiDAR sensor readings.
local function onUpdate(dt, depth1, depth2, depth3, depth4, annot1, annot2, annot3, annot4)
  -- Your implementation goes here.
@/lua/ge/extensions/gameplay/rally/driveline/drivelineRoute.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("DrivelineRoute - onUpdate")
@/lua/ge/extensions/ui/bindingsLegend.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  fadeUpdate(dtReal)
@/lua/ge/extensions/gameplay/rally/vehicleTracker.lua

-- function C:onUpdate(dt, raceData)
function C:onUpdate(dtReal, dtSim, dtRaw)
-- function C:onUpdate(dt, raceData)
function C:onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("VehicleTracker - onUpdate")
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamVariablesChecker.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/c2/panelPlugins/vehicleManager.lua

local function onUpdate(dt)
  if not activeServer or not next(subscribers) then return end
@/lua/ge/extensions/util/screenshotCreator.lua
local lastFrameImageResolution = {}
local function onUpdate(dtReal, dtSim, dtRaw)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/editor/decalEditor.lua

local function onUpdate()
  local res = cameraMouseRayCast()
@/lua/ge/extensions/flowgraph/nodes/events/onUpdate.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  self.pinOut.flow.value = true
@/lua/ge/extensions/gameplay/traffic/vehicle.lua

function C:onUpdate(dt, dtSim)
  if not map.objects[self.id] then return end

    self.role:onUpdate(dt, dtSim)
  else
@/lua/ge/extensions/editor/api/dynamicDecals.lua
  app.textureSet = decalProjection:getTextureSet()
  app:onUpdate()
    profilerPushEvent('dynamicDecals/app:onUpdate_()')
    app:onUpdate()
    profilerPopEvent('dynamicDecals/app:onUpdate_()')
  -- force to refresh the new vehicle shape
  if(app) then app.onUpdate() end
  M.updateVehicleMaterials()
@/lua/ge/extensions/career/modules/delivery/generator.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  hasGeneratedThisFrame = false
@/lua/ge/extensions/gameplay/drift/destination.lua

local function onUpdate()
  isBeingDebugged = gameplay_drift_general.getExtensionDebug("gameplay_drift_destination")
@/lua/ge/extensions/util/maptiles.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not renderView then
@/lua/ge/extensions/core/vehicle/inplaceEdit.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not vBundle then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veCrashTester.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/gameplay/missions/gridmap_v2/aiRace/001-grindergrandprix/script.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  -- Loop through all spinners and update their timers
@/lua/ge/extensions/gameplay/drift/quickMessages.lua

local function onUpdate(dt)
  if firstOnUpdate then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veVehicleSpawner.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/traffic/roles/police.lua

function C:onUpdate(dt, dtSim)
  local targetVeh = self.targetId and gameplay_traffic.getTrafficData()[self.targetId]
@/lua/ge/extensions/core/gamestate.lua
local waitingForChangeUI = 0
local function onUpdate(dtReal, dtSim, dtRaw)
  if #listeners == 0 or waitingForUIChangeToLoading then
@/lua/ge/extensions/gameplay/util/damageAssessment.lua

local function onUpdate()
  if debug then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veRawData.lua

local function onUpdate()
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/taxi.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not be:getPlayerVehicle(0) then return end
@/lua/ge/extensions/editor/veMain.lua
  -- intentionally calling onUpdate 2 times to initialize editor (because of loading popup deferred initialization)
  editor_main.onUpdate()
  editor_main.onUpdate()
  editor_main.onUpdate()
  editor_main.onUpdate()
    -- force call main update mainly for imgui layout state save
    editor_main.onUpdate()
  end
@/lua/ge/extensions/gameplay/drift/stuntZones/driftThrough.lua

function C:onUpdate()
  self:sendDecals()
@/lua/ge/extensions/career/modules/playerDriving.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if M.preStart and freeroam_specialTriggers and playerData.traffic then -- this cycles all lights triggers, to eliminate lag spikes (move this code later)
@/lua/ge/extensions/util/testExtensionProxies.lua

function ExtensionProxyTester:onUpdate(dtReal, dtSim, dtRaw)
  print('ExtensionProxyTester:onUpdate called: ' .. tostring(self.id) .. ', ' .. tostring(dtReal))

  --extProxy.hookProxies.onUpdate(123)
end
@/lua/ge/extensions/gameplay/rally/rallyManager.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("rallyManager:onUpdate")
  if self.vehicleTracker then
    self.vehicleTracker:onUpdate(dtReal, dtSim, dtRaw)
  end
  if self.drivelineRoute then
    self.drivelineRoute:onUpdate(dtReal, dtSim, dtRaw)
  end
  if self.audioManager then
    self.audioManager:onUpdate(dtReal, dtSim, dtRaw)
  end
@/lua/ge/extensions/core/ropeVisualTest.lua

local function onUpdate(dt)
  -- Update performance statistics
@/lua/ge/extensions/career/modules/loanerVehicles.lua
local playerPos = vec3()
local function onUpdate(dtReal, dtSim, dtRaw)
  for inventoryId, vehId in pairs(career_modules_inventory.getMapInventoryIdToVehId()) do
@/lua/ge/extensions/gameplay/traffic/baseRole.lua

function C:onUpdate(dt, dtSim)
end
@/lua/ge/extensions/flowgraph/nodes/activity/activityFlow.lua
end
function C:onUpdate(...)
  if not self.mgr.activity then
@/lua/ge/extensions/util/trackBuilder/splineTrack.lua
-- called every frame. when high quality is enabled, manages the timer on low quality track segments so they can be upgraded one after another.
local function onUpdate()
  if not subTracks[subTrackIndex] or not highQuality or not markersShown then return end
@/lua/ge/extensions/statistics/statistics.lua

local function onUpdate()
  local scenario = scenario_scenarios and scenario_scenarios.getScenario()
@/lua/ge/extensions/gameplay/drag/dragTypes/dragPracticeRace.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if shouldClearAfterFinish then
@/inspector/External/three.js/three.js

                    if ( texture.onUpdate ) texture.onUpdate( texture );

            if ( texture.onUpdate ) texture.onUpdate( texture );

                console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );
                return this;
@/lua/ge/extensions/editor/camPathEditor.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  -- Update function - currently unused but kept for future functionality
@/lua/ge/extensions/gameplay/util/crashDetection.lua
local vehIdList = {}
local function onUpdate(dtReal, _dtSim)
@/lua/ge/extensions/gameplay/drag/display.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not gameplay_drag_general then return end
@/lua/ge/extensions/ui/apps/pointsBar.lua

  local function onUpdate()
    if not im then return end
@/lua/ge/extensions/gameplay/rally.lua
local lastTime = 0
local function onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("gameplay_rally - onUpdate")
  -- gcprobe()
  RecceApp.onUpdate(dtReal, dtSim, dtRaw)
  -- gcprobe()
  if rallyManager and not RecceApp.isRecording() then
    rallyManager:onUpdate(dtReal, dtSim, dtRaw)
  end
@/lua/ge/extensions/editor/main.lua

local function onUpdate()
  -- if there is a toggle editor request
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veTCSDebug.lua

local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/lapTimes.lua
-- Main update function (called from extension system)
local function onUpdate(dtReal, dtSim, dtRaw)
  -- Only send streams when flagged - data is already prepared by updateXFromRace functions
@/lua/ge/extensions/core/hotlapping.lua

local function onUpdate(dt, dtSim)
  if editMode and pathData then
    if raceData then
      raceData:onUpdate(dtSim)
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veJBeamPicker.lua

local function onUpdate(dt)
  if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/rallyLoop.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  profilerPushEvent("gameplay_rallyLoop - onUpdate")
  if rallyLoopManager then
    rallyLoopManager:onUpdate(dtReal, dtSim, dtRaw)
@/gameplay/missions/gridmap_v2/collection/002-blenderbowl/script.lua

function C:onUpdate(dtReal, dtSim, dtRaw)
  -- Loop through all spinners and update their timers
@/lua/ge/extensions/career/modules/inventory.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if saveCareer then
@/lua/ge/extensions/career/career.lua

local function onUpdate(dtReal, dtSim, dtRaw)
  if not careerActive then return end