//we need to replicate what Hackable Start does in here when the character is first created and if the race changes //how did this work before? there never were any colliders on any of the UMA Bones- something must have added them? public void OnCharacterCreated(UMAData umaData) { if (infillMaterial == null) { Debug.LogWarning("No Infill material was specified on " + this.gameObject.name + ". Character will not get sliced!"); severables = new Transform[0]; return; } ConvertUMASeverablesToSeverables(); Collider[] childColliders = gameObject.GetComponentsInChildren <Collider>(); foreach (Collider c in childColliders) { GameObject go = c.gameObject; ChildOfHackable referencer = go.GetComponent <ChildOfHackable>(); if (referencer == null) { referencer = go.AddComponent <ChildOfHackable>(); } referencer.parentHackable = this; } }
void Start() { Collider[] childColliders = gameObject.GetComponentsInChildren <Collider>(); foreach (Collider c in childColliders) { GameObject go = c.gameObject; ChildOfHackable referencer = go.GetComponent <ChildOfHackable>(); if (referencer == null) { referencer = go.AddComponent <ChildOfHackable>(); } referencer.parentHackable = this; } }