Summary:
We propose to remove support for editing legacy .ly level files and slices in the O3DE editor.
What is the relevance of this feature?
Our objective is to simplify the codebase, remove unused codepaths and legacy classes, and overall improve build speed and performance of the engine.
Using slices for levels and gameplay entity instantiations have been a possibility since the first O3DE release, but it has always been highly discouraged as the new prefabs system was intended to replace slice functionality across the editor.
With the addition of prefab overrides in the latest release, the prefab system provides all features to replace the slice system for uses pertaining to level editing.
Feature design description:
The Editor currently allows users to select which system to use for level editing.
Slices are the legacy system used in Lumberyard. They store levels and entities as xml files that are hard to diff and edit manually.
Prefabs are the new system introduced in O3DE. They store levels and entities as json files that can be easily handled by version control software like git
Slices are still actively used by the UI Editor, but the editor has been defaulting to Prefabs for level editing since version 21.07. Slice support for level editing has only been provided as a toggle for backwards compatibility while prefabs reached feature parity with slices.
We propose the removal of the ability to switch the Editor to slice mode in the context of level editing.
This will allow us to start removing editor UI and classes that are only used when the editor is set to slice mode.
Note that this effort doesn’t include the removal of the Slice system and backend classes, since they are still used by the UI Editor.
Technical design description:
This work will only entail removal of legacy code, and minor changes to system classes to remove unused codepaths.
Systems that still rely on the slice system will not be affected, for example the UI Editor. Work to convert the UI Editor to use prefabs would have to be part of a separate RFC.
What are the advantages of the feature?
Reduction in build times.
This change will result in the removal of at least 15000 lines of code from the codebase, which will reduce build times.
Improvements in onboarding for new developers.
When inspecting the Editor’s code, new contributors will require less historic knowledge of the legacy systems to recognize what is current and what isn’t, making it simpler to identify the source of issues they encountered in the Editor and ease bug-fixing.
What are the disadvantages of the feature?
Loss of backwards compatibility in editing slice levels.
Note that we have been recommending users to move to prefabs since the early days of the project, and would still have had to convert slice levels to prefabs to use some of the new Editor functionality. Support for converter code/plugins is still possible since the core slice code is still available in O3DE right now.
How will this be implemented or integrated into the O3DE environment?
This change can be implemented via incremental steps as follows:
- Removal of the slice mode setting from the editor preferences / cvars and changes to the queries to always return true for prefab mode;
- Removal of the slice-specific code in the editor (mostly implemented via if/else statements across the board);
- Removal of the layer functionality, which is no longer supported in prefabs;
- Removal of the SliceFavorites Gem;
- Removal of the level exporting system, which is no longer needed with prefabs;
- Removal of the API to query for prefab/slice mode activation (or likely removal of the logic, while leaving the shell that returns a fixed value while deprecating the API)
Are there any alternatives to this feature?
An alternative would be to not move forward with this change and wait for prefabs to be supported in the UI Editor before removing slices all at once. I believe there is value in approaching this in steps though, so starting this early would prove beneficial to the community.
How will users learn this feature?
We will communicate this change to the user base on Discord and in the Release Notes for the version of the engine that hosts this change.
Are there any open questions?
This change should not affect current efforts to provide users with a converter to turn Lumberyard slice levels into O3DE prefab level files, as the slice system’s backend APIs will be unaffected. Developers should ensure that is the case in every step of the effort.
Summary:
We propose to remove support for editing legacy
.lylevel files and slices in the O3DE editor.What is the relevance of this feature?
Our objective is to simplify the codebase, remove unused codepaths and legacy classes, and overall improve build speed and performance of the engine.
Using slices for levels and gameplay entity instantiations have been a possibility since the first O3DE release, but it has always been highly discouraged as the new prefabs system was intended to replace slice functionality across the editor.
With the addition of prefab overrides in the latest release, the prefab system provides all features to replace the slice system for uses pertaining to level editing.
Feature design description:
The Editor currently allows users to select which system to use for level editing.
Slices are the legacy system used in Lumberyard. They store levels and entities as xml files that are hard to diff and edit manually.
Prefabs are the new system introduced in O3DE. They store levels and entities as json files that can be easily handled by version control software like git
Slices are still actively used by the UI Editor, but the editor has been defaulting to Prefabs for level editing since version 21.07. Slice support for level editing has only been provided as a toggle for backwards compatibility while prefabs reached feature parity with slices.
We propose the removal of the ability to switch the Editor to slice mode in the context of level editing.
This will allow us to start removing editor UI and classes that are only used when the editor is set to slice mode.
Note that this effort doesn’t include the removal of the Slice system and backend classes, since they are still used by the UI Editor.
Technical design description:
This work will only entail removal of legacy code, and minor changes to system classes to remove unused codepaths.
Systems that still rely on the slice system will not be affected, for example the UI Editor. Work to convert the UI Editor to use prefabs would have to be part of a separate RFC.
What are the advantages of the feature?
Reduction in build times.
This change will result in the removal of at least 15000 lines of code from the codebase, which will reduce build times.
Improvements in onboarding for new developers.
When inspecting the Editor’s code, new contributors will require less historic knowledge of the legacy systems to recognize what is current and what isn’t, making it simpler to identify the source of issues they encountered in the Editor and ease bug-fixing.
What are the disadvantages of the feature?
Loss of backwards compatibility in editing slice levels.
Note that we have been recommending users to move to prefabs since the early days of the project, and would still have had to convert slice levels to prefabs to use some of the new Editor functionality. Support for converter code/plugins is still possible since the core slice code is still available in O3DE right now.
How will this be implemented or integrated into the O3DE environment?
This change can be implemented via incremental steps as follows:
Are there any alternatives to this feature?
An alternative would be to not move forward with this change and wait for prefabs to be supported in the UI Editor before removing slices all at once. I believe there is value in approaching this in steps though, so starting this early would prove beneficial to the community.
How will users learn this feature?
We will communicate this change to the user base on Discord and in the Release Notes for the version of the engine that hosts this change.
Are there any open questions?
This change should not affect current efforts to provide users with a converter to turn Lumberyard slice levels into O3DE prefab level files, as the slice system’s backend APIs will be unaffected. Developers should ensure that is the case in every step of the effort.