YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

Asset Browser: Colouring values can disappear after reopening the project #6411

Open thehirou opened 3 months ago

thehirou commented 3 months ago

Description

I don't know how there has not been a single report for this since this has been happening for years iirc.

This randomly happens if you set colours to a folder, then reboot your pc. Once you open the project again they will (probably) disappear. To be honest, I'm not even sure if that's what is happening here because again, it's random, it might happen or not, but it WILL happen. Pretty sure that if you save the project as a YYZ and reopen it again the folder/assets colours disappear 100%.

Expected Change

Maintain colours in folders/assets no matter what you do to the project

Steps To Reproduce

  1. Start Gamemaker and create a new project
  2. Assign some colours to folders/assets in the Asset Browser
  3. Reboot your pc
  4. Open the project again
  5. Colours disappeared!! (Probably)

contactus.zip BLANK GAME.zip

How reliably can you recreate this issue using your steps above?

Rarely

Which version of GameMaker are you reporting this issue for?

2024.4.1 (Monthly)

Which operating system(s) are you seeing the problem on?

Windows 11

Are you running GameMaker from inside your Steam library?

Yes

Contact Us Package Attached?

Sample Project Added?

YYDan commented 3 months ago

Regarding repro steps 1, this is not a valid scenario and so I will remove those steps just now to avoid confusion.

The asset browser colours are part of your personal layout for a project, not part of the project itself. So making a .yyz would not include that information anyway, but even on your own machine importing that project would not reuse the colours from the original project as the new one would (usually) have a different name when you saved the import as a new project on disk. If you imported your .yyz with exactly the same project name, but to a different folder on disk (so Windows was okay with it), then that should reuse the existing layout, but that obviously doesn't gain you anything.

Steps 2 should of course work, though.

thehirou commented 3 months ago

What would be the harm for the colors to be assigned to the project itself? I don't see any reason for these to disappear when you import/export a yyz

YYDan commented 3 months ago

Whoever you're sending the .yyz to might not need/want your colours? Quite an important reason ;)

As I say, these values are never part of the project, so they're not "disappearing" when you make a .yyz file.

If you would like to file a separate feature request that making a .yyz should ask if you want to include the project layout folder also, then by all means do so and we can review that - although, if you're part of a team, then you can already send your team members the project layout folder as a .zip and easily share the colours and all other project customisations that way, so everyone is consistent in how the project looks inside GameMaker.

However, be aware that's not part of this issue, which is to confirm why you say colours are disappearing from the same project if you simply reopen it (i.e., are we saving the colours correctly each time a project is closed).

stuckie commented 3 months ago

The colours are saved in %AppData%\GameMakerStudio2\\Layouts\\\asset_browser.json

The important pieces there are the project name, which can be the same, but the parent project directory can be different. So these are different: C:\MyProjects\ProjectA\ProjectA.yyp C:\MyProjects\ProjectB\ProjectA.yyp

Which will be what is happening here with exporting as YYZ and reimporting it; unless you are saving over the exact same project, which is always ill-advised.

There are a few feature requests to pull these in with the project itself - #4218 for instance - so they would be bundled with the YYZ and can be ignored in .gitignores and such like.

Can you confirm you are reopening the exact same project in the exact same place and still losing the colours?

thehirou commented 3 months ago

Sorry for the late response, yes, the project path did not change when I reopened it.