Problem with exported properties on multiple workstations.

Godot Version

v4.2.2.stable.official [15073afe3]

Question

Hello everyone. I’m experiencing a weird problem with exported properties when working on multiple workstations. My main workstation is an Windows 10 machine with Godot 4.2.2.stable installed, but sometimes, I’m checking out the project on my M1 Sonoma Macbook, and try to export the game to the iPad. I’m transferring the project between machines with the git repository.

In one scene in my project, I have a tree hierarchy that looks like this:
screen4

“Database” node contains references to other nodes. Those references are stored in exported typed array.

extends Node

@export var deck_definitions : Array[DeckDefinition]

and the same goes with “DeckDefinitions”

class_name DeckDefinition extends Node

@export var card_definitions : Array[CardDefinition]

And this works good, the exported property displays correctly in the inspector, the game exports to Windows build correctly.
screen1

However, after committing this changes, and then checking it out on Mac in the editor, property is missing.

screen2
If I save the scene, and then check the local changes in git, I can see that the property was deleted by the editor.


After reverting this change, and restarting the editor - it reappears and works correctly. But when I force project to reimport (by deleting .godot folder) it happens again.

Unfortunately even if I manage to make it work correctly in editor, after exporting the game to the iPad, the problem still persists.

I tried to recreate the issue in smaller project, to do an minimal reproduction steps for the issue, but I wasn’t able to. My theory here is that there is probably an race condition during the project import. When editor tries to import Database, it doesn’t know about DeckDefinition/CardDefinition yet, so it deletes the references. That could explain why it works after deleting the changes in git after project is properly imported. However I thought that maybe it’s an typed array related issue, I checked that with non-typed array, and the problem still persist.

Has anyone experienced something like this before? Is there any way to prevent this issue?

I have definitely had issues with this. I usually delete the .Godot folder and then do a git reset --hard on the project to make sure it matches the current commit. Then open the editor.

I think the only way to prevent it, is to commit the .Godot folder. I haven’t done this yet on my own project but I think it’s probably the only way to avoid that step.

Not sure there is another way, but there could be.

Just keep in my of case sensitive filesystems. Windows and Linux are case sensitive. Mac is not. So if you have any capital case files that could be an issue.

Unfortunately, git reset --hard doesn’t help. Case sensitivity, also shouldn’t be a problem here, as all filenames in the project are lowercase.

My workaround for now is to export iOS on Windows machine, and transfer those files to Mac by network, and then build the game in Xcode. It’s inefficient, but only exports made on my main workstation, works correctly.