godotengine / godotengine/godot-cpp

Generics missing for `PackedScene::instance`

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

Description

I have a `Mob` class and a `PackedScene` with the root node of type `Mob`. I would like to instance the scene like this:

```cpp
Mob mob = mob_scene->instance();
```

However, there are no generics for `PackedScene::instance`. These exist in C# in Godot 3.3 and later, but not GDNative C++. The solution would be to add this feature to the GDNative C++ bindings.

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.