You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-05-14 20:20:06 +00:00
demo: add relative/absolute position mode demo
This commit is contained in:
@@ -14,6 +14,7 @@ public class UIElementDragger : MonoBehaviour, IBeginDragHandler, IDragHandler,
|
||||
private Canvas canvas;
|
||||
public Target m_Target;
|
||||
public Transform m_CustomTarget;
|
||||
public bool ex2;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -37,6 +38,8 @@ public class UIElementDragger : MonoBehaviour, IBeginDragHandler, IDragHandler,
|
||||
rectTransform.localPosition += delta;
|
||||
if (m_CustomTarget)
|
||||
{
|
||||
if (ex2)
|
||||
delta.Scale(canvas.rootCanvas.transform.localScale);
|
||||
m_CustomTarget.localPosition += delta;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user