This site has been permanently archived. The content on this site was last updated in 2019.
Stay organized with collections
Save and categorize content based on your preferences.
GvrDropdown
Dropdown UI component that works with the GvrRaycasters.
Summary
This is a workaround for the fact that the Dropdown component doesn't work with custom raycasters because it internally adds two GraphicRaycasters.
Inheritance
Inherits from: Dropdown
Public functions
|
OnPointerClick(PointerEventData eventData)
|
override void
|
OnSubmit(BaseEventData eventData)
|
override void
|
Public functions
OnPointerClick
override void OnPointerClick(
PointerEventData eventData
)
OnSubmit
override void OnSubmit(
BaseEventData eventData
)
Protected functions
CreateBlocker
override GameObject CreateBlocker(
Canvas rootCanvas
)
CreateDropdownList
override GameObject CreateDropdownList(
GameObject template
)
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["GvrDropdown is a UI component that enables dropdown functionality within Google VR applications, addressing compatibility issues with custom raycasters."],["It inherits from the standard Dropdown component but overrides key functions to ensure proper interaction with VR raycasting."],["GvrDropdown provides customized implementations for handling pointer clicks and submissions within the VR environment."],["Developers can utilize GvrDropdown to create interactive dropdown menus that seamlessly integrate with their VR applications."]]],["The `GvrDropdown` component overrides the standard `Dropdown` to function with custom raycasters. It provides public functions `OnPointerClick` and `OnSubmit`, which handle pointer clicks and submission events. It also features protected functions `CreateBlocker` and `CreateDropdownList`. These are to manage the creation of a blocking object, given the root canvas, and to create the actual dropdown list given the template of it. This workaround ensures compatibility where default methods fail.\n"]]