-
-
Notifications
You must be signed in to change notification settings - Fork 975
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
Rework asset editors dependencies #2167
Rework asset editors dependencies #2167
Conversation
The default DataContext is now the editor instead of the asset
Which is also spamming the console with binding errors.
- add AssetEditorViewAttribute - rework view creation and initialization
C# has covariant return types since version 9
- add AssetPreviewViewAttribute to break the dependency between a preview and its UI-dependent view
Editor prevents interaction (windows ding) after closing the initial loading window when it produced a warning. Sounds like the modal window is not properly closed maybe ?
This only occurs when running through VS so that's likely the XAML debugger blocking stuff again, not sure that's really related to your changes |
Looks like sprite sheets are broken, opening ParticleButtons in the UI particle sample opens the ui for a split second then closes it |
That's a nice bug actually. For some reason, we were returning Lines 180 to 185 in 9cc2e6b
But so far, we didn't actually care about the boolean value. Returning true now obviously fixes it.
|
It currently hardcodes loading the templates from a package which causes some tests to fail. Partially reverts c98c72e
df4ce49
to
e558a3e
Compare
PR Details
Description
Rework the relationship between assets and their editing counter parts.
The idea is to break the dependencies between what can be cross-platform (e.g. view models, previews) and what is UI-specific (editor views, preview views). On top of that, asset view model where directly dependent on their corresponding editor view model. This didn't make sense from an architecture point of view: asset view models should exist outside of an editing context ; they could for instance be reused to write an stand-alone previewer app. On the other hand, the editor view model knows which asset view model it is editing so a dependency in that direction makes sense.
Related Issue
Motivation and Context
As part of the editor rewrite, since it involves touching a lot of files, it is better to merge it into master before starting the biggest part of the rewrite. Otherwise, we could have a lot of conflicts as the
xplat-editor
branch will diverge from master. With that said, from this point we should only allow minor changes to the editor such as bug fixes, and make sure they are reported periodically to thexplat-editor
branch.Types of changes
Checklist