-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
resource_name and resource_path = empty strings #56177
Comments
@Torguen Please upload a minimal reproduction project to make this easier to troubleshoot. TouchScreenButton is a node, not a resource. It does not have a concept of resource name and resource path in its instanced form. However, a PackedScene is a resource, so it can have a name and path defined. The name is empty by default, but you can specify it manually in the inspector. The path is empty for built-in resources, and is set to a |
I don't understand this issue. |
The issue is that I wanted to know who is emitting the event and I thought that resource_path or name could tell me the node that is emitting but it is not. So I thought the problem was that the strings are empty. Maybe this is not a bug. There is really no way to know who is throwing the event in "_input". |
v3.6.beta2.official [68c507f] a scene was loaded but the name of the resource is not printed: var nivel_cargado = loader.get_resource() |
May I ask how to set the resource_name of a PackedScene? Double-clicking on a scene doesn't open it as a resource in the inspector, unlike other types of resources (it just opens the scene). The only time I can see the inspector showing PackedScene content is during debug, if I have a packed_scene var, by clicking on it in the Debugger. But changing the resource name there won't be saved (maybe because it's remote? the effect is similar to the issue linked above, but for PackedScene and during debug). Otherwise, my PackedScene resource_path is correctly set. So to debug that specific bug we'll need a MWE or steps to reproduce the issue from a new project. |
var packed_scene = load("res://my_packed_scene.tscn")
packed_scene.resource_name = "Original Name"
This is because the
This is because you're inspecting the scene as a resource, you're not editing the scene as resource. Are you sure this issue is related to your issue @hsandt ? |
Thanks, so runtime code, it explains how it could happen.
Yes, this makes sense.
I don't have an issue with this in particular, I was just curious about how OP could reach the situation they described (so ultimately get the repro steps). Well, technically I had a few issues related to resource names but they were quite different and just led me to find this ticket while searching for keywords. I don't remember exactly which ones but I probably fixed them / found a workaround at some point because I don't remember getting stuck on them. |
Godot version
3.4.1 stable
System information
w10 64
Issue description
I am trying to identify who emits the events that occur when touching the screen, on buttons like "TouchScreenButton".
For this I use "resource_path" and "resource_name" in "_input" but they are empty strings, you cannot identify who is emitting the event because they are empty strings.
Steps to reproduce
In "_input" check who issued the event using what I said before.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: