3.0.0-preview.28

# [3.0.0-preview.28](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v3.0.0-preview.27...v3.0.0-preview.28) (2020-09-01)

### Features

* support AnimatableProperty for multiple materials ([062d988](062d9887fb))
This commit is contained in:
semantic-release-bot
2020-09-01 17:39:05 +00:00
parent 2b9e8ecd73
commit 7f36ca15dd
11 changed files with 352 additions and 175 deletions

View File

@@ -2,6 +2,7 @@ using UnityEditor;
using UnityEditor.UI;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using UnityEditorInternal;
using UnityEngine.UI;
@@ -100,7 +101,12 @@ namespace Coffee.UIExtensions
EditorGUILayout.PropertyField(_spScale);
// AnimatableProperties
AnimatedPropertiesEditor.DrawAnimatableProperties(_spAnimatableProperties, current.material);
var mats = current.particles
.Where(x => x)
.Select(x => x.GetComponent<ParticleSystemRenderer>().sharedMaterial)
.Where(x => x)
.ToArray();
AnimatedPropertiesEditor.DrawAnimatableProperties(_spAnimatableProperties, mats);
_ro.DoLayoutList();
@@ -125,19 +131,21 @@ namespace Coffee.UIExtensions
// Does the shader support UI masks?
if (FixButton(current.m_IsTrail,"This UIParticle component should be removed. The UIParticle for trails is no longer needed."))
if (FixButton(current.m_IsTrail, "This UIParticle component should be removed. The UIParticle for trails is no longer needed."))
{
DestroyUIParticle(current);
return;
}
current.GetComponentsInParent(true, s_TempParents);
if (FixButton(1 < s_TempParents.Count,"This UIParticle component should be removed. The parent UIParticle exists."))
if (FixButton(1 < s_TempParents.Count, "This UIParticle component should be removed. The parent UIParticle exists."))
{
DestroyUIParticle(current);
return;
}
current.GetComponentsInChildren(true, s_TempChildren);
if (FixButton(1 < s_TempChildren.Count,"The children UIParticle component should be removed."))
if (FixButton(1 < s_TempChildren.Count, "The children UIParticle component should be removed."))
{
s_TempChildren.ForEach(child => DestroyUIParticle(child, true));
}