parent
f97e6195e6
commit
c1538a8399
|
@ -192,16 +192,10 @@ namespace Coffee.UIExtensions
|
||||||
foreach (UIParticle t in targets)
|
foreach (UIParticle t in targets)
|
||||||
{
|
{
|
||||||
t.RefreshParticles();
|
t.RefreshParticles();
|
||||||
|
EditorUtility.SetDirty(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
_ro.onReorderCallback = _ =>
|
|
||||||
{
|
|
||||||
foreach (UIParticle t in targets)
|
|
||||||
{
|
|
||||||
t.RefreshParticles(t.particles);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// On select UIParticle, refresh particles.
|
// On select UIParticle, refresh particles.
|
||||||
foreach (UIParticle t in targets)
|
foreach (UIParticle t in targets)
|
||||||
|
@ -269,9 +263,18 @@ namespace Coffee.UIExtensions
|
||||||
EditorGUILayout.PropertyField(m_AbsoluteMode);
|
EditorGUILayout.PropertyField(m_AbsoluteMode);
|
||||||
|
|
||||||
// Target ParticleSystems.
|
// Target ParticleSystems.
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
EditorGUI.BeginDisabledGroup(targets.OfType<UIParticle>().Any(x => !x.canvas));
|
||||||
_ro.DoLayoutList();
|
_ro.DoLayoutList();
|
||||||
|
EditorGUI.EndDisabledGroup();
|
||||||
serializedObject.ApplyModifiedProperties();
|
serializedObject.ApplyModifiedProperties();
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
{
|
||||||
|
foreach (var uip in targets.OfType<UIParticle>())
|
||||||
|
{
|
||||||
|
uip.RefreshParticles(uip.particles);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Does the shader support UI masks?
|
// Does the shader support UI masks?
|
||||||
if (current.maskable && current.GetComponentInParent<Mask>())
|
if (current.maskable && current.GetComponentInParent<Mask>())
|
||||||
|
|
Loading…
Reference in New Issue