Skip to content

[VFX] Fix Mouse Event Binder in player #3411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

PaulDemeulenaere
Copy link
Contributor

@PaulDemeulenaere PaulDemeulenaere commented Feb 5, 2021


Purpose of this PR

Fix this warning :

com.unity.visualeffectgraph\Runtime\Utilities\EventBinding\Implementation\VFXMouseEventBinder.cs(98,14): warning CS0108: 'VFXMouseEventBinder.OnEnable()' hides inherited member 'VFXEventBinderBase.OnEnable()'. Use the new keyword if hiding was intended.

Registered at : https://fogbugz.unity3d.com/f/cases/1313003/


Testing status

Updating VFX_HDRP to use the new input system & cover this kind of warning.
Tested locally.


Comments to reviewers

This error should have been caught by the csc.rsp but since the problematic code is inside #if INPUT_SYSTEM only specific configuration

See also https://unity.slack.com/archives/CC68SH5SB/p1612536197008600

* Fix missing call to CreateVFXEventAttribute

OnValidate is only called in editor, in runtime, we should init cache data with OnEnable

* *Update changelog.md
# Conflicts:
#	com.unity.visualeffectgraph/CHANGELOG.md
Getting rid of error like :
```You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
 stacktrace: UnityEngine.Input.get_mousePosition () (at <67986192636d462489158a112b065e02>:0)
UnityEngine.UI.MultipleDisplayUtilities.GetMousePositionRelativeToMainDisplayResolution () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/MultipleDisplayUtilities.cs:40)```
…e-and-fix-warning

# Conflicts:
#	com.unity.visualeffectgraph/CHANGELOG.md
@PaulDemeulenaere PaulDemeulenaere marked this pull request as ready for review February 8, 2021 13:42
@PaulDemeulenaere PaulDemeulenaere merged commit ad7357e into master Feb 8, 2021
@PaulDemeulenaere PaulDemeulenaere deleted the vfx/fix/1290625-fix-event-binder-in-runtime-and-fix-warning branch February 8, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants