<!-- Page: https://rustic-game-engine.pages.dev/docs/api/scene/find -->

# Game.scene.Find()

[Scene lookup](https://rustic-game-engine.pages.dev/markdown/api/scene.md)

## Compatibility

**Supported languages:** C, C++, C#, Python, JavaScript, Lua 5.4, Luau, Java, PHP and HTML/inline JavaScript (binding spellings and return shapes differ).

Use a compatible native engine build and the language tools required by your binding. This does not establish browser/mobile export or release qualification for every OS.

The signature below is the shared reference notation; language examples show the actual binding syntax. Question marks mark optional arguments and explicit defaults are shown where recorded. Do not copy reference notation as a typed declaration.

See [Feature status and compatibility](https://rustic-game-engine.pages.dev/markdown/reference/compatibility.md) for API 1.0/1.1 and per-method restrictions. Engine release tags and Docs v0.1 are independent versions.

## Signature

`Game.scene.Find(path)`

## Setup and usage

Resolve references during `Start` and cache the stable ID when possible. List paths for discovery and tooling, not every frame.

## Parameters

| 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.

## Execution behavior

Core write timing differs between immediate Lua host calls, deferred JavaScript/Web commands and external SDK query flushes. Scheduled actions advance with the scene clock; synchronous queries evaluate at the call. Follow [execution rules](https://rustic-game-engine.pages.dev/markdown/guides/scripting.md#when-mutations-take-effect) and the return/timing notes for this category.

## Language examples

Use these snippets inside Start/on_start after generating the Programming Workspace and attaching the script. Python imports rustic, Game and instance from rustic; C++ includes rustic.hpp; C includes rustic.h; C# uses using static Rustic; Java runs inside a Rustic subclass; PHP declares global $rustic, $Game, $instance in its callback. HTML uses an inline script in a ui/ asset. See [Lifecycle callbacks](https://rustic-game-engine.pages.dev/markdown/callbacks.md) for complete registration examples. Public-property examples require a declared integer health property. Scene examples require the named objects to exist before Play.

### Lua 5.4

```lua
local id=Game.scene.Find('Room.Player')
local found,err=rustic.find_entity('Room.Player')
local paths=Game.scene.List()
local foundById = rustic.find_entity(rustic.entity_id())
```

### JavaScript

```javascript
const id=Game.scene.Find('Room.Player');
const paths=Game.scene.List();
const found = rustic.find_entity(rustic.entity_id());
```

### Python

```python
entity_id=Game.scene.Find('Room.Player')
paths=Game.scene.List()
found = rustic.find_entity(rustic.entity_id())
```

### C++

```cpp
auto id=Game.scene.Find("Room.Player");
auto paths=Game.scene.List();
auto found = rustic.find_entity(rustic.entity_id());
```

### C#

```csharp
string? id=Game.scene.Find("Room.Player");
var paths=Game.scene.List();
var found = rustic.find_entity(rustic.entity_id());
```

### Luau

```lua
local id = Game.scene.Find('Room.Player')
local ids = Game.scene.List()
local foundById = rustic.find_entity(rustic.entity_id())
```

### C

```c
const char *id = Game.scene.Find("Room.Player");
RusticList ids = Game.scene.List("Game.scene");
const char *found = rustic.find_entity(rustic.entity_id());
```

### Java

```java
String id = Game.scene.Find("Room.Player");
var ids = Game.scene.List();
var found = rustic.find_entity(rustic.entity_id());
```

### PHP

```php
$id = $Game->scene->Find("Room.Player");
$ids = $Game->scene->List();
$found = $rustic->find_entity($rustic->entity_id());
```

### HTML / inline JS

```javascript
const id=Game.scene.Find('Room.Player');
const paths=Game.scene.List();
const found = rustic.find_entity(rustic.entity_id());
```

## Shared Scene lookup constraints

- 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.

## Errors and debugging

Read the constraints above and the Console diagnostic. Invalid types, non-finite values, stale targets or unavailable native services can fail validation. A failed callback disables the behavior; a failed source reload keeps the last good instance. Exact error messages depend on the language adapter. See [Troubleshooting](https://rustic-game-engine.pages.dev/markdown/troubleshooting.md).

## Related APIs

- [Game.scene.List()](https://rustic-game-engine.pages.dev/markdown/api/scene/list.md)
- [rustic.find_entity()](https://rustic-game-engine.pages.dev/markdown/api/scene/find-entity.md)

[All scene APIs](https://rustic-game-engine.pages.dev/markdown/api/scene.md)
