Skip to content
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

Fix deprecated onSceneGUIDelegate warning for Unity 2019.1 or newer #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rfadeev
Copy link

@rfadeev rfadeev commented May 23, 2020

Summary

Fixed warnings when using package via UPM with Unity 2019.1 or newer:

Packages\NormalPainter\Assets\Editor\NormalPainterWindow.cs(38,13): warning CS0618: 'SceneView.onSceneGUIDelegate' is obsolete: 'onSceneGUIDelegate has been deprecated. Use duringSceneGui instead.'
Packages\NormalPainter\Assets\Editor\NormalPainterWindow.cs(43,13): warning CS0618: 'SceneView.onSceneGUIDelegate' is obsolete: 'onSceneGUIDelegate has been deprecated. Use duringSceneGui instead.'

If needed, fine for me to open pull request to dev branch.

Details

Unity made onSceneGUIDelegate obsolete in 2019.1, see https://github.com/Unity-Technologies/UnityCsReference/blob/2019.1/Editor/Mono/SceneView/SceneView.cs#L363. In 2018.4 it was not obsolete, see https://github.com/Unity-Technologies/UnityCsReference/blob/2018.4/Editor/Mono/SceneView/SceneView.cs#L253. Used Unity version define to support both versions.

How to test

Install package via UPM using source branch and Unity 2018.4 and Unity 2019.1 and check normal painter editor window works:

"com.utj.normalpainter": "https://github.com/rfadeev/NormalPainter.git#fix-onsceneguidelegate-warning",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant