godotengine / godotengine/godot

Type 'Noise' does not provide any constructors in C#

Open
#96,396 2 comments 0 reactions 0 assignees View on GitHub
bug topic:dotnet
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in Godot 4.3 stable dotnet and 4.2.2 stable dotnet, when using C#

### System information

Windows 11

### Issue description

From my limited experimentation, I assume that this is because the inbuilt Noise class is abstract. Whilst this isn't an issue with GDScript, it prevents C# scripts inheriting from this class, as the language - as far as I know - requires classes to have a constructor, and should provide one by default - although that appears not to be the case here, because its not an actual C# class, but a wrapper of some sort. IDK, I'm not really familiar with the inner workings of Godot.

![Screenshot 2024-08-31 152758](https://github.com/user-attachments/assets/cae18e3e-ba2e-4f3d-9131-0b76ec4784ae)
![Screenshot 2024-08-31 154742](https://github.com/user-attachments/assets/2c3007fe-6a88-40a3-9ad4-6ea729032b01)

### Steps to reproduce

Create a C# class that inherits from Noise, and try to build the project.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure in Godot 4.3 stable .NET by creating a C# class that inherits from Noise and building the project. Then inspect the C# wrapper for Noise; done means the derived class builds successfully while the existing GDScript behavior remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, godot
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.