FIX: Fixed exceptions being thrown by OnScreenStick and improved warnings related to missing UGUI dependencies for current implementations. #1948
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
CHANGE: Added warning messages to both
OnScreenStick
andOnScreenButton
Inspector editors that would display a warning message in case on-screen control components are added to aGameObject
not part of a valid UI hierarchy.FIX: ISXB-915 OnScreenStick throws System.Exception if added to a GameObject not part of a UGUI object hierarchy.
FIX: ISXB-916 Entering play-mode with a OnScreenStick attached to a non UI hierarchy Game Object floods console with InvalidCastException.
Changes made
See Description. Changes introduced on
OnScreenStick
andOnScreenButton
repectively to respect the fact that base classOnScreenControl
is currently agnostic to UI system whileOnScreenStick
andOnScreenButton
currently only support UGUI (UnityEngine.UI).Notes
Recommend testing with repro steps from linked tickets.
There is also a UX or potential docs perspective to review in how the changes to warning messaged in UI and Console are affected.
Changes require manual verification.
Checklist
Before review:
Changed
,Fixed
,Added
sections.([case %number%](https://issuetracker.unity3d.com/issues/...))
.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: