ParticleSystemCurveEditor.SetVisible C# (CSharp) Method

SetVisible() public method

public SetVisible ( UnityEditor.SerializedProperty curveProp, bool visible ) : void
curveProp UnityEditor.SerializedProperty
visible bool
return void
    public void SetVisible(SerializedProperty curveProp, bool visible)
    {
        int num = this.FindIndex(curveProp);
        if (num >= 0)
        {
            this.m_AddedCurves[num].m_Visible = visible;
        }
    }

Usage Example

示例#1
0
 protected virtual void SetVisibilityState(ModuleUI.VisibilityState newState)
 {
     if (newState != this.m_VisibilityState)
     {
         if (newState == ModuleUI.VisibilityState.VisibleAndFolded)
         {
             ParticleSystemCurveEditor particleSystemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
             foreach (SerializedProperty current in this.m_ModuleCurves)
             {
                 if (particleSystemCurveEditor.IsAdded(current))
                 {
                     this.m_CurvesRemovedWhenFolded.Add(current);
                     particleSystemCurveEditor.SetVisible(current, false);
                 }
             }
             particleSystemCurveEditor.Refresh();
         }
         else if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
         {
             ParticleSystemCurveEditor particleSystemCurveEditor2 = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
             foreach (SerializedProperty current2 in this.m_CurvesRemovedWhenFolded)
             {
                 particleSystemCurveEditor2.SetVisible(current2, true);
             }
             this.m_CurvesRemovedWhenFolded.Clear();
             particleSystemCurveEditor2.Refresh();
         }
         this.m_VisibilityState = newState;
         SessionState.SetInt(base.GetUniqueModuleName(), (int)this.m_VisibilityState);
         if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
         {
             this.Init();
         }
     }
 }
All Usage Examples Of ParticleSystemCurveEditor::SetVisible