Get all objects||doc136855
September 20, 2022
- Function class:
- Call limit:
Return a table containing all object instances in the game world, with player ID as the key and player instance as the value.
Matters Needing Attention
The objects sent and accessed by the client are limited, and they can only access objects within the scope of the client's vision. There is no such restriction on the server.
|table||Table containing all object instances|
Get all objects in the current world and output their object IDs and names
local objects = World.CurWorld:getAllObject() for _, object in pairs(objects) do print(object.objID, object.name) end