PlushEngine C# API reference#
API home · First script · Gameplay guides · All types
Use using PlushEngine; in project gameplay scripts. APIs operate on live runtime instances; they do not modify authored project data. Add a class derived from Script as an object component.
Core types#
| Type | Purpose |
|---|---|
Script | Base class; lifecycle callbacks; owning Entity and Scene |
RuntimeEntity | Component lookup, transforms, activity, movement, lifetime, sockets and body control |
RuntimeScene | Find/spawn/destroy objects, query physics, time, input, effects and scene loading |
SceneNavigation, NavigationAgent | Query baked 3D routes through Scene.Navigation and follow them with a character; see Navigation |
GameSession | In-memory values shared across scene changes |
DataBlock, DataReference<T>, DataCatalog | Project-defined shared settings; choose in the Inspector and resolve through Scene.Data.Get |
DataRecord | Inline immutable records within shared definitions, including list items |
Input and time#
| Type | Purpose |
|---|---|
InputActions | Scene-owned named controls; access through Scene.Input |
GameKey, GamepadAxis | Keys, mouse and gamepad buttons, and stick axes to bind actions to |
SceneTimers, TimerHandle | Scheduled callbacks and cancellation |
SceneCoroutines, CoroutineHandle, Wait | Cooperative scene-owned sequences |
TimeClock, Tweens, Ease, Lifetime | Clock selection, interpolation and timed destruction |
Physics and animation#
| Type | Purpose |
|---|---|
CharacterController | Capsule movement and jump intent |
Ragdoll | Animated/dynamic body handoff |
Contact, CollisionLayers | 3D contact events and named query masks |
Motion2D, Contact2D | Swept 2D movement and contacts |
RigidBody2D, WheelJoint2D, PhysicsSettings2D | 2D rigid-body simulation |
AnimationPlayback | Clips, blends, layers, sockets and motion matching; access through Entity.Animation |
MotionWarp | Warp a sampled motion trajectory toward a target |
References and values#
| Type | Purpose |
|---|---|
AssemblyReference | Authored object template for spawning |
SceneReference | Authored reference to a placed object |
AnimationClipReference | Controller clip slot |
EffectReference | Authored effect |
SoundReference, Note | Authored sound and the note to play it at (Scene.PlaySound) |
SoundVoice | A playing sound: volume, pitch, move, stop, wait |
Transform, Transform2D | Immutable spatial/planar poses; replace a property with an updated value |
SceneLibrary, LibraryItem | Runtime library lookup |
ScriptFault | Reported callback failure |
The alphabetical type index includes every public PlushEngine type declared in the runtime, including supporting asset descriptions and lower-level host types. Type pages list actual source declarations, public property access, overloads, defaults and source documentation. Follow base-type links for inherited members. Record constructor parameters also declare properties.
Runtime rules#
- A scene owns its objects, timers and coroutines. Destroyed handles cannot be reused as live objects.
- Spawn creates instance-owned state; authored templates and shared assets remain unchanged.
- Callbacks run on the simulation thread. Use scene timers/coroutines for scheduled gameplay work.
- Unqualified spatial APIs use 3D. Explicit
2DAPIs have their own types and units; rotation units are documented on the member and in the movement guide. - The player has no editor or Python dependency.
Lifecycle · Ownership and spawning · Errors