Gdscript gives ^"string" a different color, but does it mean anything? (StringName alias?)

I know about StringName and its &"name" declaration…

But what does ^"Name" does?

I was trying to remember the character for StringName when typed ^"name".
Gdscript gives it a different color it, and it even works fine without any errors or warnings.

But does it do anything?
Is it an alias for StringName or just some strange quirk that does nothing?

Couldn’t find any documentation at all about this. So maybe it is just the colors acting wierd and gdscript just ignores the ^character and reads it as a normal string.

"String" is just a String
&"String" is a StringName
$"String" is an alias to get_node() with a NodePath
%"String" is also an alias to get_node() but to a node with a unique name
^"String" is NodePath

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.