godotengine / godotengine/godot-cpp

Extending a class(A) from class(B) from a GDExtension(C) defined class results in Could not found(B)

Open
#1,414 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

### Godot version

4.2

### godot-cpp version

4.2

### System information

macos m1

### Issue description

I have a GDExtension that defines a class(C).
I then have a GDScript, B that extends C.(This works)
Then I have a GDScript A that extends B.(This doesn't work).

If I change the name of class B and rename it back, it works in editor. No more errors
If I export, it doesn't work.

Error is always:
```
SCRIPT ERROR: Parse Error: Could not resolve class "StreamToText".
at: GDScript::reload (res://addons/godot_whisper/capture_stream_to_text.gd:0)
SCRIPT ERROR: Compile Error:
at: GDScript::reload (res://samples/godot_whisper/StartButton.gd:-1)
ERROR: Failed to load script "res://samples/godot_whisper/StartButton.gd" with error "Compilation failed".
```

Workaround, which I will do, only extend once. Extending multiple times seems to cause issue.

### Steps to reproduce

Download the godot whisper(v1.0.3) and run sample
https://github.com/V-Sekai/godot-whisper/releases/tag/v1.0.3

### Minimal reproduction project

https://github.com/V-Sekai/godot-whisper/releases/tag/v1.0.3

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.