phaserjs / phaser-editor-issues

Phaser Editor's bug tracker.
0 stars 0 forks source link

Controlling the visibility of resource packages with the same name #33

Open Ariorh1337 opened 3 months ago

Ariorh1337 commented 3 months ago

In cases where one game has clones with different graphics but the same logic, the files contain resource packages with the same names. To put it simply, I mean the skin system.

We need a solution inside the editor interface that will allow to switch the visibility of packages with duplicate names.

the solution is very similar to https://phaser.io/editor/docs/misc/resources-filtering however, filtering forces to write separate scripts to launch the editor for each individual case in order to modify the json of exceptions The preferred solution would be to have an "editorHide" parameter inside the package, which would be switched inside the interface, and after switching would reload the new package and clear the old one.

PhaserEditor2D commented 1 month ago

Yet I think using the resource filtering you can solve this issue. If you structure well your assets, you can show/hide the entire folder with assets of a skin.

Ariorh1337 commented 1 month ago

create 2 folders with different names 2 asset packages inside which there are two pictures with the same key. you will see that two different pictures in the editor are visible as the first picture and at the same time it is impossible to distinguish them. the editor should allow me just disable package if i want to instead of creating scripts to dynamic modification of resource filtering and restarting editor

this is one of the projects for example:

CleanShot 2024-10-13 at 22 56 08@2x - Copy
PhaserEditor2D commented 1 month ago

I mean, you can exclude the car or chef folder from the project. If you want to hide the car skin, add a .skip file to that folder.

Ariorh1337 commented 1 month ago

I think I'd better explain, I don't need a solution, I did implemented the functionality I needed. This is a task for the community to improve the quality of life and add filter functionality inside the editor interface. Consider this task the same way as a task to implement an installer, it's just improving accessibility

PhaserEditor2D commented 1 month ago

Ah, ok, I will let this issue open and think more about it. The "editorHide" field in the asset pack is not a bad solution at all. I will think about it. Keep in contact.