123456789101112131415161718192021 |
- using System;
- using UnityEngine;
- [AddComponentMenu("NGUI/Interaction/Drag and Drop Root")]
- public class UIDragDropRoot : MonoBehaviour
- {
- private void OnEnable()
- {
- UIDragDropRoot.root = base.transform;
- }
- private void OnDisable()
- {
- if (UIDragDropRoot.root == base.transform)
- {
- UIDragDropRoot.root = null;
- }
- }
- public static Transform root;
- }
|