Skip to content
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

Unable to see class_name on exported Dictionary values #41034

Closed
Rubonnek opened this issue Aug 5, 2020 · 2 comments
Closed

Unable to see class_name on exported Dictionary values #41034

Rubonnek opened this issue Aug 5, 2020 · 2 comments

Comments

@Rubonnek
Copy link
Member

Rubonnek commented Aug 5, 2020

Godot version:
3.2 branch commit 23b553b

OS/device including version:
Arch Linux

Issue description:
On an exported dictionary, setting a key or value to Object and then choosing the class_name object does not show the original class_name on Inspector but Godot's built-in base class instead.

Steps to reproduce:
On the attached project:

  1. Click on the only node in the scene tree.
  2. Look at the script variables section of the Inspector
  3. What says Resource should say AwesomeClass:
    class_name_not_shown

Minimal reproduction project:
ClassNameTest.zip

@Rubonnek
Copy link
Member Author

Rubonnek commented Aug 9, 2020

Duplicate of #21789

@Rubonnek Rubonnek marked this as a duplicate of #21789 Aug 9, 2020
@Rubonnek Rubonnek closed this as completed Aug 9, 2020
@Rubonnek Rubonnek marked this as not a duplicate of #21789 Aug 9, 2020
@Rubonnek
Copy link
Member Author

Rubonnek commented Aug 9, 2020

Actually, it's possible to see this in the editor. One needs to set the resource name within the script's _init method like so:

tool
...
func _init():
    resource_name = "AwesomeClass"

Just found out about this and seems to be undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants