You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 12:10:08 +00:00
32 lines
847 B
C#
32 lines
847 B
C#
using Coffee.UIExtensions;
|
|
using Coffee.UIParticleInternal.AssetModification;
|
|
using UnityEditor;
|
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
namespace Coffee.UIParticleInternal
|
|
{
|
|
internal class UIParticleComponentModifier_AbsoluteMode : ComponentModifier<UIParticle>
|
|
{
|
|
protected override bool ModifyComponent(UIParticle uip, bool dryRun)
|
|
{
|
|
if (!uip.m_AbsoluteMode) return false;
|
|
|
|
uip.m_AbsoluteMode = false;
|
|
uip.positionMode = UIParticle.PositionMode.Absolute;
|
|
|
|
if (!dryRun)
|
|
{
|
|
EditorUtility.SetDirty(uip);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
public override string Report()
|
|
{
|
|
return " -> UIParticle.absoluteMode is obsolete. Use UIParticle.positionMode instead.\n";
|
|
}
|
|
}
|
|
}
|