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.
- Namespace
- RedGirafeGames
.Agamotto .Scripts .Runtime .Visualizers - Base Types
-
- MonoBehaviour
- Abstract
Time Visualizer
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 |
Inherited from Abstract
|
|
auto |
The visualizer listens to
OnSimulationComplete() UnityEvent to update wen received.
Inherited from Abstract
|
|
auto |
The visualizer listens to
OnTimeLineChange(TimeStone.TimeTickOrigin) UnityEvent to update when received. This
is mostly used to update during a recording
Inherited from Abstract
|
|
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 Abstract
|
|
optimize |
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 |
Inherited from Abstract
|
|
timeAgent |
The timeAgent. Should be present on the GameObject and will be automatically populated
Inherited from Abstract
|
|
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 Abstract
|
Methods
Name | Value | Summary |
---|---|---|
AddStoneListeners |
void |
Add listeners to the TimeStone
Inherited from Abstract
|
Awake |
void |
Inherited from Abstract
|
ClearVisualization |
void | |
OnInitTimeAgentsList |
void |
Callback to TimeStone's event InitTimeAgentsList
Inherited from Abstract
|
OnRecordStart |
void |
Callback to TimeStone's event OnRecordStop
Inherited from Abstract
|
OnRecordStop |
void | |
OnSimulationComplete |
void | |
OnSimulationStart |
void | |
On |
void | |
On |
void | |
OnTimeLineChange |
void | |
OnTimeLineClear |
void | |
RemoveStoneListeners |
void |
Remove listeners from the TimeStone
Inherited from Abstract
|
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 Abstract
|
Update |
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 Abstract
|