# ENTITY::_PRELOAD_ENTITY_INTERIOR

- **Hash:** `0x6C31B06E91518269`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `PreloadEntityInterior`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/_PRELOAD_ENTITY_INTERIOR

## Signature

```c
void _PRELOAD_ENTITY_INTERIOR(Entity entity, BOOL toggle);
```

## Parameters

- `entity` (`Entity`)
- `toggle` (`BOOL`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Enables or disables preloading for an entity interior.
Used to force-load interiors for train carriages that the engine disabled due to distance-based optimization.
This does not affect entities whose interiors are already managed by the engine because they are close to the player.

*Source: VORPCORE RDR3natives*

This native can enable interiors for train carriages that the game engine has disabled due to distance-based optimization.

## Usage

### Lua

```lua
PreloadEntityInterior(entity, toggle)

-- always available, by hash
Citizen.InvokeNative(0x6C31B06E91518269, entity, toggle)
```

### JavaScript

```js
PreloadEntityInterior(entity, toggle);

// by hash
Citizen.invokeNative('0x6C31B06E91518269', entity, toggle);
```

### C#

```csharp
Function.Call((Hash)0x6C31B06E91518269, entity, toggle);
```

- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
