/// <summary> /// This function is called when the object becomes enabled and active. /// </summary> protected override void OnEnable() { _cachedPosition = transform.localPosition; _activeMeshIndices = 0; UIParticleUpdater.Register(this); particles.Exec(p => p.GetComponent <ParticleSystemRenderer>().enabled = false); if (isActiveAndEnabled && m_IgnoreCanvasScaler) { _tracker.Add(this, rectTransform, DrivenTransformProperties.Scale); } // Create objects. _bakedMesh = MeshPool.Rent(); base.OnEnable(); InitializeIfNeeded(); }
/// <summary> /// This function is called when the object becomes enabled and active. /// </summary> protected override void OnEnable() { #if !SERIALIZE_FIELD_MASKABLE maskable = m_Maskable; #endif activeMeshIndices.Clear(); UIParticleUpdater.Register(this); particles.Exec(p => p.GetComponent <ParticleSystemRenderer>().enabled = false); if (isActiveAndEnabled && m_IgnoreCanvasScaler) { _tracker.Add(this, rectTransform, DrivenTransformProperties.Scale); } // Create objects. _bakedMesh = MeshPool.Rent(); base.OnEnable(); InitializeIfNeeded(); }