// Token: 0x06000228 RID: 552 RVA: 0x0000ABB4 File Offset: 0x00008DB4 protected static void SetHideFlagsRecursive(GameObject gameObject) { gameObject.hideFlags = (HideFlags.DontSaveInEditor | HideFlags.DontSaveInBuild); if (!Application.isPlaying) { gameObject.hideFlags |= HideFlags.HideInHierarchy; } IEnumerator enumerator = gameObject.transform.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; Transform transform = (Transform)obj; ParticlePrefabControl.SetHideFlagsRecursive(transform.gameObject); } } finally { System.IDisposable disposable; if ((disposable = (enumerator as System.IDisposable)) != null) { disposable.Dispose(); } } }
// Token: 0x06000224 RID: 548 RVA: 0x0000AA7C File Offset: 0x00008C7C void Initialize(GameObject prefabGameObject , Transform startTransform , Transform endTransform , Vector3 startOffsetInWorld , Vector3 endOffsetInWorld , FxFollowType followType , bool initResetRotate , float realLife , float duration , bool revert , float scaleFactor ) { if (startTransform == null || endTransform == null) { return; } if (prefabGameObject == null) { throw new System.ArgumentNullException("Prefab cannot be null"); } if (this.m_Instance != null) { Debug.LogWarningFormat("Prefab Control Playable ({0}) has already been initialized with a Prefab ({1}).", new object[] { prefabGameObject.name, this.m_Instance.name }); } else { this.m_Instance = Object.Instantiate <GameObject>(prefabGameObject); this.m_Instance.name = prefabGameObject.name + " [Timeline]"; this.m_Instance.SetActive(false); ParticleScaleUtility.ScaleEffectNode(this.m_Instance, scaleFactor); this.m_StartTrans = startTransform; if (this.m_StartTrans != null) { var anim = ParticleCtrlUtilities.FindAnimInParent(m_StartTrans); if (anim != null) { this.m_StartRole = anim.transform; } } this.m_EndTrans = endTransform; if (this.m_EndTrans != null) { var anim = ParticleCtrlUtilities.FindAnimInParent(m_EndTrans); if (anim != null) { this.m_EndRole = anim.transform; } } this.m_StartPosOffsetInWorld = startOffsetInWorld; this.m_EndPosOffsetInWorld = endOffsetInWorld; this.m_followType = followType; this.m_initResetRotate = initResetRotate; this.m_realLife = realLife; this.m_duration = duration; this.m_revert = revert; //float roleScale = 1f; if (startTransform != null) { var roleAnim = ParticleCtrlUtilities.FindAnimInParent(startTransform); if (roleAnim != null) { this.m_Instance.transform.SetParent(roleAnim.transform.parent); //roleScale = roleAnim.transform.lossyScale.x; } } //ParticleScaleUtility.ScaleEffectNode(this.m_Instance, scaleFactor * roleScale); //if (m_ParentTrans != null) //{ // m_Instance.transform.position = m_ParentTrans.position + m_PosOffsetInWorld; // if( initResetRotate) // m_Instance.transform.rotation = Quaternion.identity; // else // m_Instance.transform.rotation = m_ParentTrans.rotation; // m_Instance.transform.localScale = m_ParentTrans.lossyScale; //} else //{ // m_Instance.transform.position = m_PosOffsetInWorld; // m_Instance.transform.rotation = Quaternion.identity; // m_Instance.transform.localScale = Vector3.one; //} ParticlePrefabControl.SetHideFlagsRecursive(this.m_Instance); } }