-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't modify source TileMap
TileSetAtlasSource
when copying between scenes
#83948
Conversation
89fadb6
to
96be5b7
Compare
Hey, thanks for trying to fix the issue. I am not sure this is the right way to fix the problem. Whatever happens, a TileSetSource should always be used by a single TileSet. I feel the issue is that copy-pasting a TileMap duplicates the TileSet resource while it should not, or something like that, because there's no reason copy-pasting a TileMap would cause its TileSet's sources to be duplicated. |
96be5b7
to
70c946b
Compare
Thanks.
I can understand why this is true for external (all point to same) |
… scene to another
70c946b
to
7888183
Compare
TileMap
TileSetAtlasSource
when copy from one…TileMap
TileSetAtlasSource
when copying between scenes
Copy pasting node will duplicate all built-in resources, because they can't be shared between scenes. If the problem is that the new TileSet uses old sources, maybe the sources should be always duplicated? |
Oh ok, I did not know that there was a situation where duplicating a node would duplicate its resources automatically too. So, yes, that seems to be a good solution. |
"calling How does old fix work to fix the null Excuse my ignorance... |
Superseded by #88280. Thanks for the contribution! |
Closes: #83218
This fixes the issue by effectively reversing some changes from #78477
for internal tilesets.and fixing it another way.I am unsure exactly when it is the right time to delete the source from the old tilemap so maybe these conditions are wrong but seems to work.
EDIT: TODO: need to ensure this issue is not "unfixed". which it seems to be now? #77045 (ya condition must be wrong as that example uses internal tileset too.)Thanks.