Fix multiple init calls on skin components.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Cryville.Crtr.Event {
|
||||
|
||||
protected Transform RootTransform;
|
||||
|
||||
SkinComponent[] _comps;
|
||||
readonly List<SkinComponent> _comps = new List<SkinComponent>();
|
||||
|
||||
public Vector3 Position { get; protected set; }
|
||||
public Quaternion Rotation { get; protected set; }
|
||||
@@ -130,7 +130,10 @@ namespace Cryville.Crtr.Event {
|
||||
MatchDynamic(ps, 0);
|
||||
ChartPlayer.etor.ContextEvent = null;
|
||||
ChartPlayer.etor.ContextState = null;
|
||||
_comps = RootTransform.GetComponentsInChildren<SkinComponent>();
|
||||
foreach (Transform child in RootTransform) {
|
||||
if (child.name.Contains(':')) continue;
|
||||
_comps.AddRange(child.GetComponentsInChildren<SkinComponent>());
|
||||
}
|
||||
foreach (var i in _comps) i.Init();
|
||||
}
|
||||
public virtual void PostInit() {
|
||||
|
Reference in New Issue
Block a user