Add event to spline for updating custom data

This commit is contained in:
Wojtek Figat
2021-02-02 12:53:18 +01:00
parent 85a6f485f1
commit 00fab5cfd6
2 changed files with 7 additions and 0 deletions

View File

@@ -416,6 +416,8 @@ void Spline::UpdateSpline()
last.TangentIn = first.TangentIn;
last.TangentOut = first.TangentOut;
}
SplineUpdated();
}
void Spline::GetKeyframes(MonoArray* data)

View File

@@ -348,6 +348,11 @@ public:
public:
/// <summary>
/// Called when spline gets updated (eg. after curve modification).
/// </summary>
API_EVENT() Action SplineUpdated;
/// <summary>
/// Updates the spline after it was modified. Recreates the collision and/or any cached state that depends on the spline type.
/// </summary>