OnionSkinVisualizer Class

Summary

Visualizer displaying the object's state before and/or after the current tick. Similar to the Onion Skin concept in animation. You can choose how many ticks to displat and the timeing between ticks. Beware : This visualizer instantiates a duplication of the GameObject for each tick visualized (for example if you display 2 ticks before and 3 ticks after, your object will be duplicated 5 times in the scene), this could harm performances if it's used on complex objects or with a lot ticks visualized. In that case, you should consider extending this visualizer and use an other system creating sprite or anything less expensive in performance instead of Game Object duplication.
graph BT Type-->Base0["AbstractTimeVisualizer"] click Base0 "/api/RedGirafeGames.Agamotto.Scripts.Runtime.Visualizers/AbstractTimeVisualizer" Base0-->Base1["MonoBehaviour"] Type["OnionSkinVisualizer"] class Type type-node

Syntax

[AddComponentMenu("Agamotto/Onion Skin Visualizer")]
public class OnionSkinVisualizer : AbstractTimeVisualizer

Attributes

Type Description
AddComponentMenu

Fields

Name Constant Value Summary
afterCount
The number of ticks visualized after
afterTiming
The number of tick between each visualized after
applyDuplicateColor
Applies duplicateColor to the duplicate material
autoAssignStone
Automatically assigns the stone from the first stone interacting with the timeAgent
Inherited from AbstractTimeVisualizer
autoUpdateOnSimulationComplete
The visualizer listens to OnSimulationComplete() UnityEvent to update wen received.
Inherited from AbstractTimeVisualizer
autoUpdateOnTimeLineChange
The visualizer listens to OnTimeLineChange(TimeStone.TimeTickOrigin) UnityEvent to update when received. This is mostly used to update during a recording
Inherited from AbstractTimeVisualizer
beforeCount
The number of ticks visualized before
beforeTiming
The number of tick between each visualized before
duplicateColor
The color applied to the duplicate if applyDuplicateColor is true
duplicateMaterial
If defined, the material applied to the duplicates
duplicatePrefab
If defined, the duplicates will be created from this prefab instead of a duplication of the GameObject.
logDebug
Log all messages
Inherited from AbstractTimeVisualizer
optimizeSameTransform
If true, duplicates with same transform data as the original object won't be displayed. This prevents flickering from overlapping objects. Should be set to false if you're object is a skinned mesh and keeps the same position
stone
The TimeStone visualized.

Unlike TimeAgent, a visualizer can only be used by one stone.

Inherited from AbstractTimeVisualizer
timeAgent
The timeAgent. Should be present on the GameObject and will be automatically populated
Inherited from AbstractTimeVisualizer
visualizationEnabled
Flag to know if the visualization must be visible. It will be set to false if critical data are missing, like the timeAgent or the timeStone for example.
Inherited from AbstractTimeVisualizer

Methods

Name Value Summary
AddStoneListeners() void
Add listeners to the TimeStone
Inherited from AbstractTimeVisualizer
Awake() void
Inherited from AbstractTimeVisualizer
ClearVisualization(int) void
OnInitTimeAgentsList() void
Callback to TimeStone's event InitTimeAgentsList
Inherited from AbstractTimeVisualizer
OnRecordStart() void
Callback to TimeStone's event OnRecordStop
Inherited from AbstractTimeVisualizer
OnRecordStop() void
OnSimulationComplete() void
OnSimulationStart() void
OnStoneInitTimeAgentsList(TimeStone) void
OnTimeAgentSetDataTick(TimeStone, int) void
OnTimeLineChange(TimeStone.TimeTickOrigin) void
OnTimeLineClear() void
RemoveStoneListeners() void
Remove listeners from the TimeStone
Inherited from AbstractTimeVisualizer
TryDisableClone() void
Visualizer is only used by the Original Time Agent. But when a TimeAgent is cloned for simulation, its Visualizers components are cloned with it. So if the time agent is a clone (used by simulation), visualizer is disabled to optimize
Inherited from AbstractTimeVisualizer
UpdateVisualizationStatus() void
Sets flag visualizationEnabled in case the visualizer misses a critical data to be displayed. This flag must be used in the Component extending AbstractTimeVisualizer
Inherited from AbstractTimeVisualizer