-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Rework modifying tile source ID #79419
Conversation
Hmm, I disagree on removing it, it's needed to be accessible somewhere in the editor. This is needed in case you want to replace an atlas by another or something like that, so it has some uses in the editor. But yeah, I understand it's dangerous to expose it so easily. What I would suggest:
Ideally, I believe this should be done with a custom property editor. (like with the ID value and an "edit" button) |
I was experimenting with a lot of tilesets until finally settling down on my approach. After my failed attempts, the IDs were something like 3, 5, and 8. I'm very glad I could just put the tiles source in ID 1, decorations source in ID 2, and interactables in ID 3. Would've been quite annoying to use in code otherwise. I second gr0ud, doesn't seem wise to remove this fully. |
What I meant by "possible via scripting" is that you can use a simple EditorScript to re-assign your IDs: func _run():
var tiles = load("res://tileset.tres")
tiles.get_source(old_id).set_id(new_id)
ResourceSaver.save(tiles) But I can look into making the suggested changes .-. |
EditorScript isn't something that tilemap users who would need this necessarily know how to use. |
godot.windows.editor.dev.x86_64_ivASbN7u6e.mp4I tried to make the dialog not so ridiculously wide, but failed.
That's why I mentioned that we could document it. |
Running code in the editor makes a brief mention of EditorScript, but it should be amended to show a full concrete example (e.g. automatically multiplying the range of all lights in the scene). |
b55c8e7
to
9e20924
Compare
Like the current commit and the warning, instead of 'unexposing' like in the original title. You need the source id for set_cell when doing procedural generation of maps. |
Ah, needs a rebase now. |
Thanks! |
Part of godotengine/godot-proposals#7177
This PR unexposed atlas/scene source ID property from the inspector:
It's an advanced feature and providing it for inexperienced users may, in worst case, cause data loss which might be not easy to recover (see the proposal). Changing ID is still possible via scripting. I wonder if it should be documented 🤔