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

Extended C# custom types aren't detected by the editor #54835

Open
olexatourko opened this issue Nov 10, 2021 · 2 comments
Open

Extended C# custom types aren't detected by the editor #54835

olexatourko opened this issue Nov 10, 2021 · 2 comments

Comments

@olexatourko
Copy link

olexatourko commented Nov 10, 2021

Godot version

3.3.3

System information

Ubuntu 20.04

Issue description

I added a custom type with a plugin using AddCustomType. The custom type appears in the node selector as expected and shows the icon.

However when I extend the node with a new script, the editor looses the type/icon information in the extended node. BT_Task is the custom type added by the plugin, and BT_Task2 is using a script that extends the type. It looses the icon, and when i hover it it says its of type Node instead of BT_Task.

Screenshot_20211110_094520

I'm not sure if this is actually a bug or not but I can't find anything in the docs about it. I expected that I could just extend custom types the same way that i can base types. Also I'm not sure why the custom type still shows a script icon beside it.

Steps to reproduce

Create a C# custom type via plugin and then try to extend a node of that type.

Minimal reproduction project

No response

@olexatourko
Copy link
Author

olexatourko commented Nov 10, 2021

Any node with a script that extends a custom type seems to be completely disconnected from that custom type. For example,

public class BT_InspectorPlugin : EditorInspectorPlugin
{
	public override bool CanHandle(Godot.Object @object)
	{
		GD.Print(@object.GetType());
		return (@object is BT_Task);
	}
}

Just shows Godot.Node for the custom type i'm trying to extend. Is custom type inheritance simply not a thing?

Edit Okay; the extended script is picked up in the logic above of I give it the [Tool] attribute. I assumed it'd detect the attribute from the base script. Unfortunately the type and icon still aren't correct in the node tree however.

@piratesephiroth
Copy link
Contributor

piratesephiroth commented Dec 11, 2021

I guess this should be included in #44879/#48201

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

3 participants