Skip to content

Live Variables Editor REPL

They let you assign a persistent name to any runtime value, a GameObject, Component, number, list, texture, whatever. And use it instantly from anywhere in Scriptum, across REPL, Editor, or even inside Spells.

Think of them as runtime anchors. Once you bind something, it becomes a named, live-tracked reference available throughout the session.


What Exactly Is a Live Variable?

A Live Variable is a runtime binding between a value and a name. Once you create one, it:

  • Gets injected into the current session context
  • Can be accessed anywhere using @yourName
  • Works seamlessly across REPL and Editor modes
  • Reflects the current state of the object live
  • Can be used in expressions, spells, and result evaluators

Live Variables are tracked dynamically. That means if you bind a Component, and its field changes, you will see the updated value wherever it's used. They are context-aware, quick to create, and help you write less code when working with repetitive targets or deeply nested references.


Why Live Variables Matter?

Without Live Variables, you’d need to repeat verbose lookups like this:

GameObject.Find("Player").GetComponent<Health>().TakeDamage(10);

With Live Variables:

@player.TakeDamage(10);

That’s the power of binding once, then scripting freely.

Live Variables reduce boilerplate, speed up experimentation, and allow reusable scripting patterns. You can bind key runtime targets like enemies, prefabs, manager singletons, or components, and keep reusing them across scripts without redundant setup.


How They Behave in Scriptum

  • Live Variables are scoped to the current session
  • They persist while the domain is alive and will refresh correctly
  • They are shared between REPL and Editor
  • You can bind nested members and reuse them too (@player.stats.health)
  • They can be renamed, removed, or cleared entirely

Learn More

  • 👉 Live Variables View : Explore the full tree view interface for managing and inspecting Live Variables

  • 👉 Using Live Variables : Covers syntax, usage in REPL and Editor, code examples, and best practices