Skip to content

Commit fd31132

Browse files
committed
Workflow simplification, documentation update, code cleaning
+Added more summaries in code +Improved Animator rewind method +Changed and simplified custom variable tracker implementation (AdditionalRestore() and AdditionalReset() not required anymore) +Timescale is now changeable (although not in runtime) +Cleared scripts from unnecessary references +Changed the method name from GetSnapshotFromSavedValues() to Rewind() +Circular buffer have exposed methods working directly in seconds so the position doesnt need to be calculated anymore +Simplified RewindAbstract class +Now also tracking the active state of audiosource +Updated documentation (More important sections added)
1 parent aaa5948 commit fd31132

19 files changed

Lines changed: 181 additions & 232 deletions
117 KB
Binary file not shown.

Assets/TimeRewinder/ExampleScene/Import/source/DinosaurAnim.controller

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ AnimatorStateTransition:
323323
m_Mute: 0
324324
m_IsExit: 0
325325
serializedVersion: 3
326-
m_TransitionDuration: 0.25
326+
m_TransitionDuration: 0
327327
m_TransitionOffset: 0
328328
m_ExitTime: 0.9563953
329329
m_HasExitTime: 1

Assets/TimeRewinder/ExampleScene/ScriptsForScene/BounceFromPlane.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections;
2-
using System.Collections.Generic;
31
using UnityEngine;
42

53
public class BounceFromPlane : MonoBehaviour

Assets/TimeRewinder/ExampleScene/ScriptsForScene/DinosaurWalk.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using System.Collections;
2-
using System.Collections.Generic;
31
using UnityEngine;
42
using UnityEngine.UI;
53

64
public class DinosaurWalk : MonoBehaviour
75
{
8-
[SerializeField] GameObject dinosaur;
96
[SerializeField] bool isWalking = false; //The trick is that this variable is tracked in dinosaur animator
7+
8+
9+
[SerializeField] GameObject dinosaur;
1010
[SerializeField] Text rewindIndication;
1111
void FixedUpdate()
1212
{

Assets/TimeRewinder/ExampleScene/ScriptsForScene/ParticleTimer.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections;
2-
using System.Collections.Generic;
31
using UnityEngine;
42
using UnityEngine.UI;
53

Assets/TimeRewinder/ExampleScene/ScriptsForScene/ScaleChanger.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Collections;
3-
using System.Collections.Generic;
42
using UnityEngine;
53
using UnityEngine.UI;
64

Assets/TimeRewinder/ExampleScene/TimeRewindExample 1.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ Animator:
644644
m_Avatar: {fileID: 0}
645645
m_Controller: {fileID: 9100000, guid: a594c99d0b0c0ad47bc425deff531dd1, type: 2}
646646
m_CullingMode: 0
647-
m_UpdateMode: 0
647+
m_UpdateMode: 1
648648
m_ApplyRootMotion: 0
649649
m_LinearVelocityBlending: 0
650650
m_WarningMessage:
@@ -1592,7 +1592,7 @@ MonoBehaviour:
15921592
m_HorizontalOverflow: 1
15931593
m_VerticalOverflow: 0
15941594
m_LineSpacing: 1
1595-
m_Text: 0,1
1595+
m_Text: 1
15961596
--- !u!222 &714198695
15971597
CanvasRenderer:
15981598
m_ObjectHideFlags: 0

Assets/TimeRewinder/ExampleScene/TimeRewindExample 2.unity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,7 @@ Animator:
30233023
m_Avatar: {fileID: 0}
30243024
m_Controller: {fileID: 9100000, guid: 2802aaa2dcc380c498f4891db99132fb, type: 2}
30253025
m_CullingMode: 0
3026-
m_UpdateMode: 0
3026+
m_UpdateMode: 1
30273027
m_ApplyRootMotion: 0
30283028
m_LinearVelocityBlending: 0
30293029
m_WarningMessage:
@@ -3042,8 +3042,8 @@ MonoBehaviour:
30423042
m_Script: {fileID: 11500000, guid: 14bc155fbb04eba44b3a343b40fb836c, type: 3}
30433043
m_Name:
30443044
m_EditorClassIdentifier:
3045-
dinosaur: {fileID: 3843793275252677193}
30463045
isWalking: 0
3046+
dinosaur: {fileID: 3843793275252677193}
30473047
rewindIndication: {fileID: 354136547}
30483048
--- !u!114 &3843793275252677196
30493049
MonoBehaviour:

Assets/TimeRewinder/TimeRewinderImplementation/Prefabs/ClockKeyPress.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ AudioSource:
7474
m_PlayOnAwake: 0
7575
m_Volume: 0.5
7676
m_Pitch: 1
77-
Loop: 0
77+
Loop: 1
7878
Mute: 0
7979
Spatialize: 0
8080
SpatializePostEffects: 0

Assets/TimeRewinder/TimeRewinderImplementation/Prefabs/ClockSlider.prefab

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ AudioSource:
175175
m_PlayOnAwake: 0
176176
m_Volume: 0.5
177177
m_Pitch: 1
178-
Loop: 0
178+
Loop: 1
179179
Mute: 0
180180
Spatialize: 0
181181
SpatializePostEffects: 0
@@ -270,8 +270,8 @@ MonoBehaviour:
270270
m_Name:
271271
m_EditorClassIdentifier:
272272
slider: {fileID: 4065960114815223673}
273-
rewindSound: {fileID: 4065960114815223556}
274273
rewindManager: {fileID: 4065960116027654745}
274+
rewindSound: {fileID: 4065960114815223556}
275275
--- !u!1 &4065960114903631333
276276
GameObject:
277277
m_ObjectHideFlags: 0

0 commit comments

Comments
 (0)