UnityEditor.ParticleSystemUI.ApplyProperties C# (CSharp) Method

ApplyProperties() public method

public ApplyProperties ( ) : void
return void
        public void ApplyProperties()
        {
            bool hasModifiedProperties = this.m_ParticleSystemSerializedObject.hasModifiedProperties;
            this.m_ParticleSystemSerializedObject.ApplyModifiedProperties();
            if (hasModifiedProperties)
            {
                if (!ParticleEffectUI.IsStopped(ParticleSystemEditorUtils.GetRoot(this.m_ParticleSystem)) && ParticleSystemEditorUtils.editorResimulation)
                {
                    ParticleSystemEditorUtils.PerformCompleteResimulation();
                }
                this.UpdateParticleSystemInfoString();
            }
            if (this.m_RendererSerializedObject != null)
            {
                this.m_RendererSerializedObject.ApplyModifiedProperties();
            }
        }

Usage Example

示例#1
0
 public void PlayOnAwakeChanged(bool newPlayOnAwake)
 {
     ParticleSystemUI[] emitters = this.m_Emitters;
     for (int i = 0; i < emitters.Length; i++)
     {
         ParticleSystemUI particleSystemUI = emitters[i];
         InitialModuleUI  initialModuleUI  = particleSystemUI.m_Modules[0] as InitialModuleUI;
         initialModuleUI.m_PlayOnAwake.boolValue = newPlayOnAwake;
         particleSystemUI.ApplyProperties();
     }
 }