![]() You can use the TouchManager.ControlsEnabled property to enable and disable all touch controls as a whole. Public enum GizmoShowOption Enabling / Disabling Controls The TouchManager component is also a singleton class with a static public API, making it convenient to use and query elsewhere in your project. InControl also ensures touches are properly cancelled when they should be. The primary advantage is tracking touches is far easier. You can also compare touches for equality using these references. This means you can grab a reference to a touch and hang on to it. Touches in InControl are represented by classes instead of by structs like Unity’s touches. Even without adding touch controls, you can now take advantage of the TouchManager API to query touches, which provides a few advantages over Unity’s touch API. Create a Touch Camera game object as a child to the InControl game object.Īt this point InControl is set up for touch support.Add the Touch Manager component to the InControl game object.You can add it via the GameObject > InControl > Touch > Manager menu command. ![]() Attach the InControlManager component to the InControl game object.Create a new game object in the scene hierarchy named InControl.You can add it via the GameObject > InControl > Manager menu command. Getting Startedįirst, make sure you have the InControlManager added to the scene. Currently, four control components are provided:Ĭontrols can be positioned and sized either in terms of screen percent or pixels. InControl provides touch control functionality by means of a virtual device which behaves like any other controllers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |