Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

2019.2.5f1: No UI buttons, no gizmos, unusable #233

Closed
JillCrungus opened this issue Oct 21, 2019 · 2 comments
Closed

2019.2.5f1: No UI buttons, no gizmos, unusable #233

JillCrungus opened this issue Oct 21, 2019 · 2 comments

Comments

@JillCrungus
Copy link

SabreCSG is completely unusable in Unity 2019.2.5f1, the UI does not show and nor do any gizmos show on CSGModels.

image

The console warns that SceneView.onSceneGUIDelegate is obsolete.
image

@pjbaron
Copy link

pjbaron commented Oct 25, 2019

Same in 2019.2.10f1

I'm looking at the errors and they're mostly trivial to fix but some parts like this:
if (!EditorHelper.SceneViewHasDelegate(OnSceneGUI)) (CSGModel.cs:1345)
inspect the list of delegates for the SceneView. That doesn't appear to be possible any more (the new 'SceneView.duringSceneGui' can only be used on the left of a += or -= instruction)

This was always a bit hacky, the comment explains:

// Make sure the events we need to listen for are all bound (recompilation removes listeners, so it is
// necessary to rebind dynamically)

So maybe someone can answer the question: in Unity 2019 does recompilation still remove listeners?
If not then we can just add the delegate once in a constructor or init function.

If that won't work then (unless SceneView contains a way to check if a delegate has already been assigned - I flicked through the docs but didn't see one) we will need to maintain a list of which delegates were added, and reset it when compilation occurs.

@Henry00IS
Copy link
Collaborator

That's just been fixed! It was really a puzzle, but I found a simple workaround (see PR). Have fun in 2019! 😁

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

No branches or pull requests

3 participants