FingersScript Class |
Namespace: DigitalRubyShared
public class FingersScript : MonoBehaviour
The FingersScript type exposes the following members.
Name | Description | |
---|---|---|
FingersScript | Initializes a new instance of the FingersScript class |
Name | Description | |
---|---|---|
animation | Obsolete. The Animation attached to this GameObject. (Null if there is none attached). | |
audio | Obsolete. The AudioSource attached to this GameObject. (Null if there is none attached). | |
camera | Obsolete. The Camera attached to this GameObject. (Null if there is none attached). | |
CaptureGestureHandler |
Optional handler to determine whether a game object will pass through or not.
Null handler gets default gesture capture handling.
Non-null handler that returns null gets default handling.
Non-null handler that returns true captures the gesture.
Non-null handler that returns false passes the gesture through.
| |
collider | Obsolete. The Collider attached to this GameObject. (Null if there is none attached). | |
collider2D | Obsolete. The Collider2D component attached to the object. | |
ComponentTypesToDenyPassThrough |
A set of component types that will stop the gesture from passing through. By default includes UI components like Button, Dropdown, etc.
You can add additional component types if you like, but you should not remove items from this set or clear the set.
| |
ComponentTypesToIgnorePassThrough |
A set of component types that will be ignored for purposes of pass through checking. By default includes the Text UI component.
You can add additional component types if you like, but you should not remove items from this set or clear the set.
| |
constantForce | Obsolete. The ConstantForce attached to this GameObject. (Null if there is none attached). | |
CurrentTouches |
Current touch objects begin tracked
| |
enabled | Enabled Behaviours are Updated, disabled Behaviours are not. | |
gameObject | The game object this component is attached to. A component is always attached to a game object. | |
Gestures |
All gestures added to the script
| |
guiElement | Obsolete. (Inherited from Component.) | |
guiText | Obsolete. The GUIText attached to this GameObject. (Null if there is none attached). | |
guiTexture | Obsolete. The GUITexture attached to this GameObject (Read Only). (null if there is none attached). | |
HasInstance |
Check whether Instance is not null without it actually creating a prefab if needed
Call this when removing the gestures in OnDisable
| |
hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? | |
hingeJoint | Obsolete. The HingeJoint attached to this GameObject. (Null if there is none attached). | |
Instance |
Shared static instance of fingers script that lives forever - the prefab MUST exist in a resources folder!
Note that you can still add the prefab to your scene if you prefer to do it that way, in which case the
singleton will be re-created each time a scene loads.
| |
isActiveAndEnabled | Has the Behaviour had enabled called. | |
light | Obsolete. The Light attached to this GameObject. (Null if there is none attached). | |
name | The name of the object. | |
networkView | Obsolete. The NetworkView attached to this GameObject (Read Only). (null if there is none attached). | |
particleEmitter | Obsolete. The ParticleEmitter attached to this GameObject. (Null if there is none attached). | |
particleSystem | Obsolete. The ParticleSystem attached to this GameObject. (Null if there is none attached). | |
PreviousTouches |
Previous touch locations
| |
renderer | Obsolete. The Renderer attached to this GameObject. (Null if there is none attached). | |
rigidbody | Obsolete. The Rigidbody attached to this GameObject. (Null if there is none attached). | |
rigidbody2D | Obsolete. The Rigidbody2D that is attached to the Component's GameObject. | |
runInEditMode | Allow a specific instance of a MonoBehaviour to run in edit mode (only available in the editor). | |
tag | The tag of this game object. | |
Touches |
Gets a collection of the current touches
| |
transform | The Transform attached to this GameObject. | |
useGUILayout | Disabling this lets you skip the GUI layout phase. | |
VirtualTouchCountHandler |
Get a count of virtual touches, null for none. This callback is where you should update and populate the current set of gestures for your virtual touches.
| |
VirtualTouchObjectHandler |
Get a virtual touch from a given index (0 to count - 1), null for none. Use GestureTouchFromVirtualTouch once a frame to create the GestureTouch object.
| |
VirtualTouchResetHandler |
This is called anytime fingers script is reset. All virtual touches should be cleared.
| |
VirtualTouchUpdateHandler |
This event executes after the all virtual touches have been processed by the fingers script.
This is where you would remove any ended gestures from your virtual touch gesture lists or dictionaries.
|
Name | Description | |
---|---|---|
AddGesture |
Add a gesture to the fingers script. This gesture will give callbacks when it changes state.
| |
BroadcastMessage(String) | Calls the method named methodName on every MonoBehaviour in this game object or any of its children. | |
BroadcastMessage(String, Object) | Calls the method named methodName on every MonoBehaviour in this game object or any of its children. | |
BroadcastMessage(String, SendMessageOptions) | Calls the method named methodName on every MonoBehaviour in this game object or any of its children. | |
BroadcastMessage(String, Object, SendMessageOptions) | Calls the method named methodName on every MonoBehaviour in this game object or any of its children. | |
CancelInvoke | Cancels all Invoke calls on this MonoBehaviour. | |
CancelInvoke(String) | Cancels all Invoke calls with name methodName on this behaviour. | |
CompareTag | Is this game object tagged with tag ? | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GestureIntersectsObject |
Check if a gesture intersects an object
| |
GestureTouchFromVirtualTouch |
Create a gesture touch object from a virtual touch object and updates the previous position internally
| |
GetCameraForGesture |
Get camera for a gesture using gesture start location
| |
GetComponent(Type) | Returns the component of Type type if the game object has one attached, null if it doesn't. | |
GetComponent(String) | Returns the component with name type if the game object has one attached, null if it doesn't. | |
GetComponent``1 | (Inherited from Component.) | |
GetComponentInChildren(Type) | Returns the component of Type type in the GameObject or any of its children using depth first search. | |
GetComponentInChildren(Type, Boolean) | (Inherited from Component.) | |
GetComponentInChildren``1 | (Inherited from Component.) | |
GetComponentInChildren``1(Boolean) | (Inherited from Component.) | |
GetComponentInParent(Type) | Returns the component of Type type in the GameObject or any of its parents. | |
GetComponentInParent``1 | (Inherited from Component.) | |
GetComponents(Type) | Returns all components of Type type in the GameObject. | |
GetComponents(Type, ListComponent) | (Inherited from Component.) | |
GetComponents``1 | (Inherited from Component.) | |
GetComponents``1(ListUMP) | (Inherited from Component.) | |
GetComponentsInChildren(Type) | Returns all components of Type type in the GameObject or any of its children. | |
GetComponentsInChildren(Type, Boolean) | Returns all components of Type type in the GameObject or any of its children. | |
GetComponentsInChildren``1 | (Inherited from Component.) | |
GetComponentsInChildren``1(Boolean) | (Inherited from Component.) | |
GetComponentsInChildren``1(ListUMP) | (Inherited from Component.) | |
GetComponentsInChildren``1(Boolean, ListUMP) | (Inherited from Component.) | |
GetComponentsInParent(Type) | (Inherited from Component.) | |
GetComponentsInParent(Type, Boolean) | Returns all components of Type type in the GameObject or any of its parents. | |
GetComponentsInParent``1 | (Inherited from Component.) | |
GetComponentsInParent``1(Boolean) | (Inherited from Component.) | |
GetComponentsInParent``1(Boolean, ListUMP) | (Inherited from Component.) | |
GetHashCode | (Inherited from Object.) | |
GetInstanceID | Returns the instance id of the object. | |
GetType | (Inherited from Object.) | |
Invoke | Invokes the method methodName in time seconds. | |
InvokeRepeating | Invokes the method methodName in time seconds, then repeatedly every repeatRate seconds. | |
IsInvoking | Is any invoke pending on this MonoBehaviour? | |
IsInvoking(String) | Is any invoke on methodName pending? | |
MemberwiseClone | (Inherited from Object.) | |
RectTransformToScreenSpace |
Convert rect transform to screen space
| |
RemoveGesture |
Remove a gesture from the script and dispose of it. The gesture will no longer give callbacks.
You will need to re-create the gesture.
| |
ResetState |
Reset state - all touches and tracking are cleared
| |
SendMessage(String) | Calls the method named methodName on every MonoBehaviour in this game object. | |
SendMessage(String, Object) | Calls the method named methodName on every MonoBehaviour in this game object. | |
SendMessage(String, SendMessageOptions) | Calls the method named methodName on every MonoBehaviour in this game object. | |
SendMessage(String, Object, SendMessageOptions) | Calls the method named methodName on every MonoBehaviour in this game object. | |
SendMessageUpwards(String) | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. | |
SendMessageUpwards(String, Object) | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. | |
SendMessageUpwards(String, SendMessageOptions) | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. | |
SendMessageUpwards(String, Object, SendMessageOptions) | Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour. | |
StartCoroutine(IEnumerator) | Starts a coroutine. | |
StartCoroutine(String) | Starts a coroutine named methodName. | |
StartCoroutine(String, Object) | Starts a coroutine named methodName. | |
StartCoroutine_Auto | Obsolete. (Inherited from MonoBehaviour.) | |
StartOrResetGesture |
Start or reset a gesture
| |
StopAllCoroutines | Stops all coroutines running on this behaviour. | |
StopCoroutine(String) | Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour. | |
StopCoroutine(IEnumerator) | Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour. | |
StopCoroutine(Coroutine) | Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour. | |
ToString | Returns the name of the GameObject. |
Name | Description | |
---|---|---|
AutoAddRequiredComponents | Whether to auto-add required components like physics raycasters, event system, etc. if they are missing. | |
DefaultDPI | The default DPI to use if the DPI cannot be determined | |
EnableMultiTouch | Whether to enable Unity input multi-touch automatically. | |
LevelUnloadOption | Allows resetting state (keeps the gestures, just resets them) or clearing all gestures when a level is unloaded. | |
MouseDistanceInUnitsForScaleAndRotate | The distance (in units, default is inches) for simulated fingers to start at for a mouse zoom or rotate. | |
MouseWheelDeltaMultiplier | Mouse wheel delta multiplier. | |
PassThroughObjects | Objects that should pass gestures through. By default, some UI components block gestures, such as Panel, Button, Dropdown, etc. See the SetupDefaultPassThroughComponents method for the full list of defaults. | |
ProcessUnityTouches | Whether to process Unity touch events. If false, you will need to implement the VirtualTouch* methods to implement touch handling. | |
RequireControlKeyForMouseZoom | Whether the control key is required for mouse zoom. If true, control pluse mouse wheel zooms. If false, mouse wheel alone will zoom. | |
ShowTouches | Whether to show touches using the TouchCircles array. Make sure to turn this off before releasing your game or app. | |
SimulateMouseWithTouches | Whether to treat touches as mouse pointer? This needs to be set before the script Awake method is called. | |
TouchCircles | If ShowTouches is true, this array is used to show the touches. The FingersScriptPrefab sets this up as 10 circles. | |
TreatMousePointerAsFinger | True to treat the mouse as a finger, false otherwise. Left, middle and right mouse buttons can be used as individual fingers and will all have the same location. | |
TreatMouseWheelAsFingers | True to treat the mouse wheel as two fingers for rotation and scaling, false otherwise. |