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

Virtual methods not invoked on generic superclass of Node #75301

Open
Azurelol opened this issue Mar 24, 2023 · 1 comment
Open

Virtual methods not invoked on generic superclass of Node #75301

Azurelol opened this issue Mar 24, 2023 · 1 comment

Comments

@Azurelol
Copy link

Godot version

4.0

System information

Windows 10

Issue description

When class A derives from a generic superclass, B the virtual methods such as _Ready that were overriden on B are not being invoked.

I noticed this when writing said superclass on a library project, and trying to use it on my godot project.

Steps to reproduce

First, define the superclass like so in an external project (outside res):

namespace MyLibrary
{
	public partial class Cursor2D : Node2D
	{
		public override void _Ready()
		{ 
		    <Some log message here>
		}
	}

Second, define the subclass like so:

	public partial class MyCursor2D : MyLibrary.Cursor2D
	{
	}

Now if you were to run the project, you would not see the log message printed.

Minimal reproduction project

N/A

@RedworkDE
Copy link
Member

RedworkDE commented Mar 26, 2023

Missing an MRP, but the library project is likely just not setup correctly for this to work.

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