Luna Replay allows you to capture a single piece of gameplay footage, and create unlimited variations by changing anything visual within the game without needing to re-record footage.
When preparing your game in Unity, you are able to apply the
LunaPlaygroundField attribute to any serializable field (i.e. public fields of MonoBehaviours and ScriptableObjects or fields marked with SerializeField attribute) and it will be surfaced in the playable editor in Luna Playground. These fields should be used within your game code so that the default values are overridden when the game is initialised.
This attribute will then surface these game variables when creating your replays, either in the Unity editor, or Luna Playground.
using Luna.Replay.Playground;in the script(s) you wish to configure variables in.
- Apply the Luna
LunaPlaygroundFieldattribute to your game variables
- Implement the
ISerializationCallbackReceiverinterface on a
MonoBehaviouror 'ScriptableObject' where the variables are declared
This Luna attribute should be used for the scriptable game objects you wish to edit from Luna Playground.
- Supported Types
For each Playground Field, you can specify the title, order and section.
[LunaPlaygroundField("Field title", 0, "Group title")]
- Field title: The name of the field in Playground i.e. "Tutorial Message"
- Field order: The order of the field in Playground
- Field section: The name of the group to which the field belongs i.e. "Tutorial"
LunaPlaygroundSection attribute can be applied to a class in order to add include all supported fields as Luna Playground Attributes.
The result will mean that
playerColor is exposed as a LunaPlaygroundField.