Skip to main content

Replay using Unity Editor

This guide assumes that you have followed the setup instructions and selected one or more game variables using the LunaPlayground attributes.
  1. In Unity, navigate to the Resources folder, and select the ReplaySettings asset. In the inspector, select Replay mode.
images-medium
  1. You will need to load a previously captured replay. To do so, click “Load capture and select from the list presented.

  2. Once a capture is selected, you must now create at least one video set, and apply your settings to be replayed. See Replay settings below for information on the various settings.

  3. If you are using the Luna Playground attribute to surface your game variables, you can find these in the Field Sets section of a Video Set.

images-medium
  1. When you have created your video set(s), you can press Replay!”. The editor will enter play mode and start to replay and capture videos. Do not interfere with Unity whilst recording is taking place.

  2. Once finished, you may access Project > LunaTemp to find the output video(s).


Replay settings#

  • Video Sets: a grouping of videos that you wish to record in one sequence, where the permutations (language, size and Playground Fields will overlap). For example, two sizes and two languages will create four videos.
  • System Languages: if your game uses system languages, you may select the output languages for the video recording. If not, then you may use a LunaPlayground field and adjust the text manually.
  • Resolutions: the width of the video output (currently orientation changes are not supported in the Unity Editor)
  • Field Sets: Game variables, exposed using the LunaPlaygroundField attribute (more info).
  • Scaling Strategy : the Scaling Strategy in Unity defines how the gameplay is recorded in the target resolution, and whether the input is scaled or not.
    • Scale Video - the video is replayed and recorded in the original aspect ratio. Aspect fit can be defined using the Aspect Type setting, either as scale to fit, or scale to fill.
    • Scale Gameplay - the video is replayed and recorded in the chosen resolution. Input is not scaled.
    • Scale Gameplay & Input - the video is replayed and recorded in the chosen resolution. The input is scaled proportionally to match the new resolution.
  • Video Codec: select which codec you would like to use to process your video with (by default this will be H264).
  • Remove Screenshots Alpha: enabling this will remove Screenshots Alpha.
  • Capture: select from your recordings which you want loaded, to then be able to edit the settings of (and preview via hitting Replay!).
  • Output Path: change what directory your videos will be saved to.
  • Debug Touches: enabling this checkbox will show visual cues for user input in Replay mode for debug purposes.
  • Debug Randoms: print usage of UnityEngine.Random to the console with a value and stack trace (more info).
  • Debug PlayerPrefs: print usage of UnityEngine.PlayerPrefs to the console with a value and stack trace (more info).
  • Lock Editor: leaving the editor window when recording can cause inaccuracy in the output. Please make sure to enable this option.

For more information about video size and scaling, check out the documentation on video sizing.