-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ValidatingTopLevel - Breaks Client Code in DEBUG #7573
Comments
I'm not sure the validating later is needed since #7477 got merged, what do you think @kekekeks? Given that we should now be nulling the platform impl, is there anything that would be caught by the validating layer but not nullable annotations? The one thing that comes to mind is if someone saves a long-standing reference to the platform impl, but I'm not sure if it's worth complicating things for that case? We could at least add an |
Adding |
PERFECT, THANKS! |
This only breaks when working with Avalonia DEBUG mode.
We are developing Urholonia, which uses Avalonia Source code in Debug Mode. The recent addition of "ValidatingTopLevel" broke us, because we need to be able to access our "UrhoWindowImpl", as follows:
return ((Avalonia.Controls.Window)this.VisualRoot).PlatformImpl as UrhoWindowImpl;
The problem is that in Debug mode, this returns null.
Our UrhoWindowImpl has several members and properties that are essential. We are rendering a 3D Urho Scene to an Avalonia control, inside of Urho, which looks like this:
Here we have Urho, rendering the AvaloniaControlCatalog app to an Urho-UISprite. But then inside of this Control Catalog, we've added an "UrhoView" which needs access to the "UrhoWindowImpl" to make all this work.
So we have Urho hosting an Avalonia Window, which then is hosting ANOTHER Urho Scene!... The aim here, is that Avalonia will become BOTH the Game Editor Toolset, AND the In-Game UI at the same time.
And we are currently broken (Debug mode only) by the latest ValidatingTopLevel class.
The text was updated successfully, but these errors were encountered: