UniversalViewer/Assets/Scripts/ModelViewerBase/UI/Handles/UIHandleProp.cs

23 lines
654 B
C#

using UnityEngine;
public class UIHandleProp : UIHandle
{
public static UIHandleProp CreateAsChild(ObjectContainer owner, Transform parent)
{
var handle = CreateAsChild<UIHandleProp>(parent);
handle.Init(owner).SetScale(0.65f);
return handle;
}
public override UIHandle Init(ObjectContainer owner)
{
base.Init(owner);
Popup.AddButton("Reset All", TransformResetAll);
Popup.AddButton("Reset Position", TransformResetPosition);
Popup.AddButton("Reset Rotation", TransformResetRotation);
Popup.AddButton("Reset Scale", TransformResetScale);
return this;
}
}