Skip to content

Commit

Permalink
Add some missing NoSaveDuringPlay
Browse files Browse the repository at this point in the history
  • Loading branch information
glabute committed Jun 11, 2024
1 parent 7aba388 commit ba7c9ae
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public class CinemachineClearShot : CinemachineCameraManagerBase
[FormerlySerializedAs("m_RandomizeChoice")]
public bool RandomizeChoice = false;

[SerializeField, HideInInspector, FormerlySerializedAs("m_LookAt")] Transform m_LegacyLookAt;
[SerializeField, HideInInspector, FormerlySerializedAs("m_Follow")] Transform m_LegacyFollow;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_LookAt")] Transform m_LegacyLookAt;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_Follow")] Transform m_LegacyFollow;

float m_ActivationTime = 0;
float m_PendingActivationTime = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class VcamExtraState : VcamExtraStateBase
List<VcamExtraState> m_ExtraStateCache;
ShapeCache m_ShapeCache;

[SerializeField, HideInInspector, FormerlySerializedAs("m_MaxWindowSize")]
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_MaxWindowSize")]
float m_LegacyMaxWindowSize = -2; // -2 means there's no legacy upgrade to do

const float k_CornerAngleThreshold = 10f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public struct Instruction
[FormerlySerializedAs("m_Instructions")]
public List<Instruction> Instructions = new ();

[SerializeField, HideInInspector, FormerlySerializedAs("m_LookAt")] Transform m_LegacyLookAt;
[SerializeField, HideInInspector, FormerlySerializedAs("m_Follow")] Transform m_LegacyFollow;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_LookAt")] Transform m_LegacyLookAt;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_Follow")] Transform m_LegacyFollow;

float m_ActivationTime = -1; // The time at which the current instruction went live
int m_CurrentInstruction = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public PathIndexUnit PositionUnits


// In-editor only: CM 3.0.x Legacy support =================================
[SerializeField, HideInInspector, FormerlySerializedAs("SplinePosition")] private float m_LegacyPosition = -1;
[SerializeField, HideInInspector, FormerlySerializedAs("PositionUnits")] private PathIndexUnit m_LegacyUnits;
[SerializeField, HideInInspector, FormerlySerializedAs("Spline")] private SplineContainer m_LegacySpline;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("SplinePosition")] private float m_LegacyPosition = -1;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("PositionUnits")] private PathIndexUnit m_LegacyUnits;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("Spline")] private SplineContainer m_LegacySpline;
void PerformLegacyUpgrade()
{
if (m_LegacyPosition != -1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ internal struct ParentHash
public int HashOfParent;
}
/// <summary>Internal API for the Inspector editor</summary>
[HideInInspector][SerializeField] private List<ParentHash> HashOfParent = new();
[HideInInspector, SerializeField, NoSaveDuringPlay] private List<ParentHash> HashOfParent = new();

/// <summary>Internal API for the Inspector editor</summary>
internal void SetParentHash(List<ParentHash> list)
Expand All @@ -90,8 +90,8 @@ internal void SetParentHash(List<ParentHash> list)
HashOfParent.AddRange(list);
}

[SerializeField, HideInInspector, FormerlySerializedAs("m_LookAt")] Transform m_LegacyLookAt;
[SerializeField, HideInInspector, FormerlySerializedAs("m_Follow")] Transform m_LegacyFollow;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_LookAt")] Transform m_LegacyLookAt;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("m_Follow")] Transform m_LegacyFollow;

float m_ActivationTime = 0;
int m_ActiveInstructionIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void Reset()
//============================================
// Legacy support

[HideInInspector, SerializeField, FormerlySerializedAs("m_Targets")]
[HideInInspector, SerializeField, NoSaveDuringPlay, FormerlySerializedAs("m_Targets")]
Target[] m_LegacyTargets;

void Awake()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public struct DampingSettings
CinemachineSplineRoll.RollCache m_RollCache;

// In-editor only: CM 3.0.x Legacy support =================================
[SerializeField, HideInInspector, FormerlySerializedAs("CameraPosition")] private float m_LegacyPosition = -1;
[SerializeField, HideInInspector, FormerlySerializedAs("PositionUnits")] private PathIndexUnit m_LegacyUnits;
[SerializeField, HideInInspector, FormerlySerializedAs("Spline")] private SplineContainer m_LegacySpline;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("CameraPosition")] private float m_LegacyPosition = -1;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("PositionUnits")] private PathIndexUnit m_LegacyUnits;
[SerializeField, HideInInspector, NoSaveDuringPlay, FormerlySerializedAs("Spline")] private SplineContainer m_LegacySpline;
void PerformLegacyUpgrade()
{
if (m_LegacyPosition != -1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ internal protected virtual void PerformLegacyUpgrade(int streamedVersion)
}
}

[HideInInspector, SerializeField, FormerlySerializedAs("m_Priority")]
[HideInInspector, SerializeField, NoSaveDuringPlay, FormerlySerializedAs("m_Priority")]
int m_LegacyPriority = 0;

//============================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public struct ImpulseReaction

bool m_Initialized;

[SerializeField, HideInInspector]
[SerializeField, HideInInspector, NoSaveDuringPlay]
Vector3 m_NoiseOffsets;

/// <summary>Generate a new random seed</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public enum FocusTrackingMode
CustomPassVolume m_CustomPassVolume;

/// <summary>Serialized so that the compute shader is included in the build.</summary>
[SerializeField]
[SerializeField, NoSaveDuringPlay]
ComputeShader m_ComputeShader;

void OnDisable()
Expand Down

0 comments on commit ba7c9ae

Please sign in to comment.