void Awake() { m_mixBus = WingroveMixBus.FindParentMixBus(transform); m_instanceLimiter = WingroveMixBus.FindParentLimiter(transform); if (m_mixBus != null) { m_mixBus.RegisterSource(this); } FindParameterModifiers(transform); Initialise(); }
public static InstanceLimiter FindParentLimiter(Transform t) { if (t == null) { return(null); } else { InstanceLimiter instanceLimiter = t.GetComponent <InstanceLimiter>(); if (instanceLimiter == null) { return(FindParentLimiter(t.parent)); } else { return(instanceLimiter); } } }