unity中UnityEngine.EventSystems类PointerEventData包含的属性数据

来源:互联网 发布:手机本地端口查看 编辑:程序博客网 时间:2024/05/21 11:28
namespace UnityEngine.EventSystems{public class PointerEventData : BaseEventData{//// Fields//public List<GameObject> hovered;//// Properties//public PointerEventData.InputButton button {[CompilerGenerated]get;[CompilerGenerated]set;}public int clickCount {[CompilerGenerated]get;[CompilerGenerated]set;}public float clickTime {[CompilerGenerated]get;[CompilerGenerated]set;}public Vector2 delta {[CompilerGenerated]get;[CompilerGenerated]set;}public bool dragging {[CompilerGenerated]get;[CompilerGenerated]set;}public bool eligibleForClick {[CompilerGenerated]get;[CompilerGenerated]set;}public Camera enterEventCamera {get;}public GameObject lastPress {[CompilerGenerated]get;[CompilerGenerated]private set;}public RaycastResult pointerCurrentRaycast {[CompilerGenerated]get;[CompilerGenerated]set;}public GameObject pointerDrag {[CompilerGenerated]get;[CompilerGenerated]set;}public GameObject pointerEnter {[CompilerGenerated]get;[CompilerGenerated]set;}public int pointerId {[CompilerGenerated]get;[CompilerGenerated]set;}public GameObject pointerPress {get;set;}public RaycastResult pointerPressRaycast {[CompilerGenerated]get;[CompilerGenerated]set;}public Vector2 position {[CompilerGenerated]get;[CompilerGenerated]set;}public Camera pressEventCamera {get;}public Vector2 pressPosition {[CompilerGenerated]get;[CompilerGenerated]set;}public GameObject rawPointerPress {[CompilerGenerated]get;[CompilerGenerated]set;}public Vector2 scrollDelta {[CompilerGenerated]get;[CompilerGenerated]set;}public bool useDragThreshold {[CompilerGenerated]get;[CompilerGenerated]set;}[Obsolete ("Use either pointerCurrentRaycast.worldNormal or pointerPressRaycast.worldNormal")]public Vector3 worldNormal {[CompilerGenerated]get;[CompilerGenerated]set;}[Obsolete ("Use either pointerCurrentRaycast.worldPosition or pointerPressRaycast.worldPosition")]public Vector3 worldPosition {[CompilerGenerated]get;[CompilerGenerated]set;}//// Constructors//public PointerEventData (EventSystem eventSystem);//// Methods//public bool IsPointerMoving ();public bool IsScrolling ();public override string ToString ();//// Nested Types//public enum FramePressState{Pressed,Released,PressedAndReleased,NotChanged}public enum InputButton{Left,Right,Middle}}}
以上的数据类型可以拿出来直接用。ps:作为参数传入函数即可例如:
public void MoveObject(PointerEventData eventData){     Debug.Log(eventData.pressPosition);}

                                             
0 0
原创粉丝点击