Skip to content

Playback Ignores

Rory Clark edited this page May 6, 2021 · 3 revisions

Playback Ignores are a feature that allow you to specify Unity core features and behaviours to remain active on your RecordComponents during playback. By default, every RecordComponent will automatically disable every non-RecordComponent script attached to it. This is done to prevent other logic from overriding the playback. Adding Playback Ignore settings to your scene or RecordComponent allows you to override this.

There are two ways to work with this system, through the Playback Manager by using a stored file in your assets, or by setting it manually per RecordComponent within your scene. Below explains the procedure for both and their reasonings.

How To Use Them

Playback Ignores are split between two parts, Unity logic, and custom behaviours. The Unity logic segment controls Unity Components (which do not have a unified underlying enabled/disabled property), while custom behaviours is everything else on the game object that inherits from Unity Behaviour (which has a unified enabled/disabled property).

All Playback Ignores are assigned to a specific RecordComponent type.

All the checkboxes listed here will only apply an effect when checked, leaving the default property of the object as is if unchecked.

Unity Components

Adding custom behaviours will prevent the behaviour from being disabled when playback begins. This works on both a specified type name and a string contains format, this means you can use part of a type to achieve the same result (e.g. keeping a default Unity UI button enabled could be achieved through UnityEngine.UI.Button, UnityEngine.UI, UI, or Button).

You can quickly find all the behaviours of an object by using the Add Behaviours from GameObject button, which will show you all behaviours on the object that are not currently added to your Enabled Behaviours list.

Custom Behaviours

Default Ignores

Custom RecordComponent scripts can override the default Playback Ignore through code by overriding the SetDefaultPlaybackIgnores method. You can apply the effects of these ignores to multiple transforms (done within TransformRecordComponent) by overriding the SetPlaybackIgnoreTransforms method.

This default will be ignored as soon as a Playback Ignore object is applied from an external source, either through the Playback Manager or the individual RecordComponent settings.

Playback Manager Approach

This method will apply your desired ignore settings across everything within your Playback Manager scope. This is stored as a file and can be re-used between scenes. By doing this you can quickly iterate between scenes while retaining logic

  • Create a Playback Ignore Asset file in your project assets.
    • Right click in assets -> Create -> PlayRecorder -> Playback Ignore Asset
  • Click + on any of the Available Record Components to add them to the file.
  • Assign your desired Unity Logic settings.
  • Assign your desired Enabled Behaviours.
  • Go to your Playback Manager and set the Playback Ignore File to your created file.

If you wish to revert any changes at any point you can either remove the file from the Playback Manager or

The inspector view of a created Playback Ignore file

Individual RecordComponent Approach

This method will directly apply the desired ignore settings to the current Record Component only. This is stored per object and will override any other settings set anywhere else.

  • Go to your Record Component inspector and click the Create button in Playback Info.
  • Assign your desired Unity Logic settings.
  • Assign your desired Enabled Behaviours.

If you wish to remove this specific override, simply press the Delete button.

The inspector view of the individual Playback Ignore