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
Instance-names can not include '@' signs #27608
Comments
Why do you want to set such name though? |
Well, just name all your instances you care for in unique way so that on the same level of the tree there is no duplication. This way you will now how to access each instance. I use that to save and restore from/to json. BUT there is no easy to find documentation on which symbols I can safely use in instance names. The reason I ask about this is sometimes I need annotations for objects to which I add special handling (during import or runtime). For example all names ending in _spawn are spawn points and get attached script. But also I need to specify settings so that to select what in particular to spawn and other things. So I want to have some structure of name with separators. Using some characters would be nice to make that expressive. For example having something like "char_spawn#role=gplayer#team=1#group=spawn#id=10" would be nice as there is no other nice way to produce annotations in 3D software for engine to use. |
Ran into this particular issue when writing a save system, took a while to understand what was happening too. The @ gets serialized just fine, but breaks things down the line when you try to use the name or node path for something (like parenting other nodes) as the @ gets silently stripped, leaving you none the wiser. I guess the proper workflow is to explicitly name all the instanced nodes that get used this way, but would've still been nice to know... |
This comment has been minimized.
This comment has been minimized.
@xukongwen Please ask support questions on one of the other community channels, not here. |
Ideally we would use something like XID_Continue (see this and click category search), not sure what Godot currently does (personally I've only ever used English letters and numbers for node names). |
Also @ can be in imported files. There should be some name filter functions
in API to create safe names.
…On Thu, Sep 24, 2020 at 9:36 AM Aaron Franke ***@***.***> wrote:
BUT there is no easy to find documentation on which symbols I can safely
use in instance names.
Ideally we would use something like XID_Continue (see this
<https://unicode-lookup.netlify.app/> and click category search), not
sure what Godot currently does (personally I've only ever used English
letters and numbers for node names).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#27608 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABPU37OORMAWARUQ6ZHATSHLSFVANCNFSM4HDCTTCA>
.
|
I run into this problem making a save system for color palette generation app using GraphNodes and connections are made knowing the names. This symbol shouldn't be there if it's not allowed to be used naming nodes in runtime.
|
Still don't know what caused it, tho
Quotes from the current docs:
I think the solution to this issue is to add cross-references (and possibly duplicate the list of prohibited characters into the Related: |
This is especially apparent when collision shapes are created from Mesh Instance. These will start with @ but if we click to rename and press Esc, it'll change _ with no way to go back. |
Godot version:
3.1
OS/device including version:
Arch linux
Issue description:
If you make multiple instances of the same nodetype, godot names the first instance after the node type and the other ones are prefixed with an @ and suffixed with an @ and a number. For example, if you create two Nodes of type GraphNode, the first instances name is "GraphNode" and the seconds name is "@graphnode@288" or something like this.
If you want to rename an instance and it does include an @, the @ gets discarded.
This is problematic if you want to save and load node data and node-connections.
Steps to reproduce:
Make an GraphEdit, attach a script to it. In the script, create an instance of GraphNode and add it as a child. Set it's name to "@graphnode@100". After that, print the name of the nodes instance. The name is "GraphNode100" and not "@graphnode@100"
The text was updated successfully, but these errors were encountered: