25 lines
521 B
C#
25 lines
521 B
C#
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;
|
|
}
|
|
|
|
}
|