OSRS Plugin API
    Preparing search index...

    Function debug_GetSpriteTextureStoreCount

    • Returns the number of textures currently cached for used for UI. Texture cache can be added to with functions setSpriteId and setObjId in Ui.Image.

      Returns number

      The number of textures currently stored in the texture cache of the UI.

      texCount = tostring(osrs.debug_GetSpriteTextureStoreCount())
      osrs.print("Numbers of Textures in Cache: " .. texCount)

      local img = osrs.Ui.image()
      img:setObjId(1511)
      img:setSpriteId(780)

      texCount = tostring(osrs.debug_GetSpriteTextureStoreCount())
      -- Should print out two more if objId 1511 and spriteId 780 were not already set with before the example.
      osrs.print("Numbers of Textures in Cache: " .. texCount)