Web View Input Handling
Input handling for the Web View.
The Web View UGUI component has multiple features that you can take advantage of with the input system of your choice.
Important Methods
Usually, you can simply call any of the methods below when the appropriate button is pressed. Some navigation methods may need a Vector2
or float
value.
Move
The Move
method pans the web view towards a direction.
Zoom
The SetConstantZoom
method zooms in or out. Use negatives to zoom out. Use 0
to stop the constant zoom.
Focus
The Focus
method focuses the skill at a specific direction closest to the current position.
Remove Focus
The RemoveFocus
method simply removes the focus set on a skill.
Upgrade Focused
The UpgradeFocused
method upgrades the currently focused skill. Nothing happens if nothing is focused.
Downgrade Focused
The DowngradeFocused
method downgrades the currently focused skill. Nothing happens if nothing is focused.
Reset View
The ResetView
method simply resets the web view position and zoom scale to the starting position and scale.
Reset All Skills
The ResetAllSkills
method simply sets the level of each skill to 0
.
Toggle
The Toggle
method enables or disables the content GameObject
. You can use Open
or Close
, respectively, to just do one or the other.
Example Script (New Input System)
There's an example script called SkillWebInputExample
that works with the new input system. This script is used for both demos. Here's the script for reference:
Last updated