Scene lookup API
Resolve stable scene paths to entity IDs and list paths in the play snapshot.
When to call it
Resolve references during Start and cache the stable ID when possible. List paths for discovery and tooling, not every frame.
Calls
Game.scene.Find(path)Game.scene.List()rustic.find_entity(name_or_id)
Variables
| Variable | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Stable scene path, name, or entity ID accepted by the adapter. |
Return and timing
Find returns an entity ID or no value. List returns entity IDs.
Language examples
Lua 5.4
lua
local id,err=rustic.find_entity('Room.Player')
local paths=Game.scene.List()JavaScript
javascript
const id=Game.scene.Find('Room.Player');
const paths=Game.scene.List();Python
python
entity_id=Game.scene.Find('Room.Player')
paths=Game.scene.List()C++
cpp
auto id=Game.scene.Find("Room.Player");
auto paths=Game.scene.List();C#
csharp
string? id=Game.scene.Find("Room.Player");
var paths=Game.scene.List();Luau
lua
local id = Game.scene.Find('Room.Player')
local ids = Game.scene.List()C
c
const char *id = Game.scene.Find("Room.Player");
RusticList ids = Game.scene.List("Game.scene");Java
java
String id = Game.scene.Find("Room.Player");
var ids = Game.scene.List();PHP
php
$id = $Game->scene->Find("Room.Player");
$ids = $Game->scene->List();HTML / inline JS
javascript
const id=Game.scene.Find('Room.Player');
const paths=Game.scene.List();Constraints and behavior
- Every gameplay language calls the engine-owned API. Rustic supplies SDKs and dispatches callbacks; scripts do not parse requests or serialize responses. See the language guide for complete setup and callback registration.