Skip to content

Cross-platform editor rewrite - prototype#2034

Merged
Kryptos-FR merged 864 commits into
stride3d:xplat-editorfrom
Color-Rise:xplat-editor
Apr 12, 2025
Merged

Cross-platform editor rewrite - prototype#2034
Kryptos-FR merged 864 commits into
stride3d:xplat-editorfrom
Color-Rise:xplat-editor

Conversation

@Kryptos-FR

@Kryptos-FR Kryptos-FR commented Nov 13, 2023

Copy link
Copy Markdown
Member

PR Details

This PR contains the initial work on a new cross-platform editor using Avalonia for the UI framework.

Description

In order to keep the changes separate from the existing editor libraries, a new folder sources/xplat-editor has been created. In this folder, there are a bunch of new projects, some which have the same naming of existing ones. The idea is that at some point, it should be possible to replace the old projects with the new ones, adapt the existing WPF code and have two versions of the editor (one implemented with WPF, the other with Avalonia) that we can compare to ensure we have all the features ported from the old one to the new one.

Related issues

Feature highlights

Attributes and types registration

See documentation page

Services

See documentation page

Architectural changes

You will notice that the number of projects have greatly increased. But no panic, some are just duplicates while we work on the new editor. There are few new projects that will stay though. Those are directly related to Avalonia, and they have Avalonia in their name (e.g. Stride.Core.Assets.Editor.Avalonia. The reason is simple: such projects have a direct dependency with Avalonia and implements the UI/UX part of the editor, while those without that name are UI-agnostic and only have a dependency on the MVVM pattern. In other words, the latter could be reused with other MVVM-supporting UI libraries such as WPF, MAUI or any other that could come in the future (including, why not, our own Stride-implemented UI).

On top of that, some classes (esp. view models) that were previously implemented in Stride.Core.Assets.Editor are now relocated in more editor-agnostic libraries (such as Stride.Core.Assets.Presentation or Stride.Assets.Presentation. Again, the idea is that such libraries could be reused for more simple type of apps (such as viewers for instance) that don't require the full-fledged editing capabilities but just need a MVVM version of the Core or the Stride assets.

Motivation and Context

Why not?

Just kidding. There have been numerous wishes over the years to have an editor working on other platforms than Windows.
There is also a need to have a fully-fledged plugin system, and in order to achieve that similar changes to the one allowing cross-platform experience are needed. Hence, this project aims to achieve both.

Types of changes

  • Docs change / refactoring / dependency upgrade
    • There is a README per project, which surely counts as a doc change.
    • There will be a need to write or rewrite a lot of docs, once we have reached a stable point.
  • Bug fix (non-breaking change which fixes an issue)
    • While reworking how the different editor libraries interact with each others, some bugs are likely fixed (but hard to know which ones).
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • Likely some breaking changes in the way the editor libraries are working. However, the runtime libraries should be untouched for the most part.

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
    • Nope 😁.
  • All new and existing tests passed.
    • No idea. Not the point of this PR.
  • I have built and run the editor to try this change out.
    • The new one that is 😉.

@Shadowblitz16

This comment was marked as off-topic.

@Shadowblitz16

This comment was marked as off-topic.

@Eideren

Eideren commented May 2, 2024

Copy link
Copy Markdown
Collaborator

@Shadowblitz16 @Yuisyuu We're glad you guys are interested but please keep the conversation on topic :)

@MetalMaxMX

Copy link
Copy Markdown

@Kryptos-FR Any updates on how this is going so far?

@Kryptos-FR

Kryptos-FR commented Jul 18, 2024

Copy link
Copy Markdown
Member Author

@MetalMaxMX I'll finally be able to resume working on it. My workplace accepted a reduced schedule where I will have full days (unpaid) to work on something else. I plan to use some of that time to continue the port.

@MetalMaxMX

Copy link
Copy Markdown

@MetalMaxMX I'll finally be able to resume working on it. My workplace accepted a reduce schedule where I will have full days (unpaid) to work on something else. I tend to use some of that time to continue the port.

Awesome! Good luck and fingers crossed for an eventual Cross-platform editor :)

dloe and others added 7 commits August 28, 2024 22:20
…ception (stride3d#2410)

* Added early warning and better error logging for CharacterComponent missing physical shapes

- Will now incorporate logger with a warning when Attachments of shapes for KinecticCharacter are skipped due to no ColliderShapes being present.
- errors given inside CharacterComponent will also include call info for users to trace and find what corresponding code is calling the physic method.

* Cleaned up comments

+ fixed typo in comment

* Added extra check for No Shapes warning

Found reference to older code that may have at one point had this check and warning. Added the extra check I had not accounted for

* Removed repetitive check for lack of collider shap

- Removed check that occurs after DisableSimulation check and now has it ahead of simulation check

* Moved comment to summary of PhysicsComponent OnAttach

Cosmetic change with comments and summary

* Reduced code reuse with dedicated function for logging

Maybe it could go ever farther and be put in the Logger class? May update
…3d#2422)

* Run proper Rigidbody setup when adding ColliderShape

* Added test case for proper setup with GetOrCreate

* Followed similar Bepu format with creation of ReAttach method

* Reformatted files edited

* Revert "Reformatted files edited"

This reverts commit 1c9b03e.
* fix: Correct reference added to BoundingBox

* fix: cref corrected - removed full stop

* fix: cref for AudioEmitterComponent corrected

* fix: param fixed from rotation to scale

* fix: RaiseException doesn't exist, most likely it should be SetException, which is present

* fix: cref corrected with full namespace

* fix: cref references corrected

* chore: Reversing the update because it's not working

* fix: Incorrect reference

* fix: The C# reference itself doesn't exist but the reference seems ok

* fix: Correcting the references

* fix: Fixed xml comment

* fix: xml summary corrected

* fix: cref reversed back, but added full namespace

* fix: Fixing see xml tag with appropriate html link to our manual
…3d#2423)

The comment for the `Entity` class has been updated to provide a more detailed description. It now specifies that the class represents a game entity that typically aggregates multiple `EntityComponent` instances. Additionally, it includes references to the Stride documentation for more information about adding and managing entities.
…(TFM) when passed to NuGet resolver to properly load NuGet libraries (stride3d#2432)

Co-authored-by: Basewq <Basewq@users.noreply.github.com>
Jklawreszuk and others added 16 commits March 29, 2025 14:59
* Adds native dependencies for win-arm64

- The used versions of those dependencies are often rather dated and didn't build out of the box on win-arm64 / Visual Studio 2022, minimal patches had to be applied
- As far as I understood PVRTexLib is delivered as binary only and there's no win-arm64 - therefor added a check to not load it at all. In the end it's only needed by the asset compiler, which in turn is platform neutral. However when invoking it on a arm64 machine, the `dotnet path/to/asset/compiler` will launch it in arm64. If there would be some option to launch it in x64 we wouldn't have any issues with asset compiling. Still the editor might have issues, since its running in process?
- Removed the FreeImageNET load - it's not used anywhere in code
- Fixes some PInvoke signatures in DxtWrapper

* Fixes build of Stride.VisualStudio.sln

Probably introduced by ddc7423

* Removes ARM64 from UWP

* Updates checkout scripts of freetype and Bullet and NativePath
* fix: NoSampler is now point instead of linear to prevent validation layer errors.

NoSampler was created using the default linear sampler, this caused validation errors
when using Texture.Load with Texture3d(r16b16f) as it does not support linear sampling.

The sampler was changed to use a point sampler instead which prevents the errors and should cause no issues.

* fix: Fixed Vulkan concurrency issues

Added locking to upload buffer creation and internal queue submit as 0
they are called from multiple threads if texture streaming is eanbled.

* Fixed race condition
…tride3d#2694)

The dlls were built using `sources\tools\Stride.TextureConverter.Wrappers\build-deps.bat` inside of developer command prompt of VS2022
…nd more) (stride3d#2527)

Co-authored-by: Nicolas Musset <nicolas@color-rise.xyz>
Co-authored-by: Virgile Bello <virgile@stride3d.net>
@Kryptos-FR Kryptos-FR merged commit d072fbd into stride3d:xplat-editor Apr 12, 2025
@github-project-automation github-project-automation Bot moved this from Review to Done in Avalonia Editor Rewrite Apr 12, 2025
@Kryptos-FR Kryptos-FR deleted the xplat-editor branch April 14, 2025 09:37
Jklawreszuk added a commit to Jklawreszuk/stride that referenced this pull request Apr 14, 2025
@Kryptos-FR Kryptos-FR added this to the Editor Rewrite - Phase 1 milestone Apr 28, 2025
@Kryptos-FR Kryptos-FR added area-GameStudio work-estimate-XL Weeks of work. Basically an epic that needs to be broken down labels Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-GameStudio work-estimate-XL Weeks of work. Basically an epic that needs to be broken down

Projects

Development

Successfully merging this pull request may close these issues.