RUSTICDOCSSearch documentation

Built-in attributes

Read or edit engine-owned entity attributes.

Feature status and language/platform compatibility

Choose an API to see its signature, parameters, examples and behavior.

APIs

Module guide

When to call it

Use attributes for built-in entity state. Prefer set_translation for Position and set_enabled for Enabled when those dedicated calls better express intent.

Variables

VariableTypeRequiredDescription
sourcestringYesStable entity ID or full rustic.game.Scene.Root.Child path for object helpers.
namestringYesName, Position, Size, Color (RGB), CanTouch, CanCollide, DoubleSided (boolean), Anchored, Friction (number, 0..10), or Parent.
valueattribute-specificYesValue matching the attribute type.

Return and timing

Get returns the current value. Edit validates a typed mutation; write timing depends on the runtime.

Constraints and behavior

  • DoubleSided defaults to false; true renders both inside and outside faces of primitives and imported meshes in editor and game views, without changing collision geometry. In Play, unanchored built-in primitives fall under gravity; CanCollide enables solid box response only when both objects enable it. Anchored prevents physics movement and clears velocity on the next fixed tick. CanTouch enables object clicks, touchscreen taps and collision subscriptions when both bodies allow touch; it does not affect solid response. Friction defaults to 0.5 and accepts finite coefficients from 0 through 10. See Touchscreen input and object clicks. Imported meshes do not simulate yet. See the Basic physics guide for setup and limits. Unknown attributes and type changes are rejected. Parent accepts a stable entity ID or null. Target another object with rustic.game.Scene.Root.Child:EditAttribute in Lua, native member calls in JavaScript/Python/C#/PHP, C++ subscripts, or an edit_attribute protocol command containing source. See Edit scene objects for setup, native calls in every language, and runtime limits.
  • 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.
  • The direct edit_object_attribute helper is available in embedded Lua and JavaScript (including HTML); other SDKs use the native scene-object call shown above. Only embedded Lua exposes a path-based GetAttribute. For the scene-object example, create a scene named Demo with Room → Player. Change those names to match your scene; see Edit scene objects for full setup.