IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Public Attributes | List of all members
CustomEventData Class Reference
Inheritance diagram for CustomEventData:
Inheritance graph
[legend]
Collaboration diagram for CustomEventData:
Collaboration graph
[legend]

Public Member Functions

 CustomEventData (EventSystem system)
 

Public Attributes

Vector3 delta3D
 
Vector2 textureCoord
 
int hitTriangleIndex
 
ButtonType buttonType
 

Detailed Description

The CustomEventData extends Unity's PointerEventData to pass along additional information. Some info which we need (like texture coordinates) aren't passed to events by Unity per default. This is why we added the CustomEventData, which extends the default PointerEventData. All mouse events which are called (enter/exit/hover/click etc.) get a CustomEventData passed to them. However, since we try to use as much of Unity's event system as possible, the data is passed as a PointerEventData. To access the additional information given by CustomEventData, simply cast it: CustomEventData cEventData = eventData as CustomEventData; Afterwards, make sure to check if the cast worked by checking if cEventData == null. If cEventData is not null, then you can use it to access the textureCoord, delta3D etc.

Definition at line 16 of file CustomEventData.cs.

Member Data Documentation

Vector3 CustomEventData.delta3D

The difference between recently hit positions in world coordinates.

Definition at line 19 of file CustomEventData.cs.

Vector2 CustomEventData.textureCoord

u,v coordinates of the hit point.

Definition at line 22 of file CustomEventData.cs.


The documentation for this class was generated from the following file: