25 lines
521 B
C#
Raw Normal View History

2025-03-31 08:39:35 +08:00
using GCSeries.Core.Samples;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class DeviceDraggable : Draggable
{
Vector3 pos;
Vector3 rot;
private void Awake()
{
pos = transform.position;
rot = transform.localEulerAngles;
}
public override void OnEndDrag(PointerEventData eventData)
{
base.OnEndDrag(eventData);
transform.position = pos;
transform.localEulerAngles = rot;
}
}