godotengine / godotengine/godot-cpp

function new() and _init()

Open
#740 2 comments 1 reaction 0 assignees View on GitHub
discussion
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

There are two questions I would like to ask:
1. When the gdnative script function parameters have default values, the functions that gdscript calls it must all be assigned values, otherwise the game will exit after running the godot game timeout, and there will be no error message.

2. In gdscript, such as: 'var class=preload("res://**").new()', if the 'new()' function has a value such as 'new(self)', it will prompt an error, The '_init()' parameter is zero.

How should I solve the above two problems.
--This article comes from network translation

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.