Script API methods must return Ref<T> instead of Reference*

ptrcall assumes methods that return a Reference type do so with Ref<T>. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!).
This commit is contained in:
Ignacio Etcheverry 2019-07-03 09:49:46 +02:00
parent 270af6fa08
commit aa9908e4f6
4 changed files with 10 additions and 3 deletions

View file

@ -220,7 +220,7 @@ EditorSelection *EditorInterface::get_selection() {
return EditorNode::get_singleton()->get_editor_selection();
}
EditorSettings *EditorInterface::get_editor_settings() {
Ref<EditorSettings> EditorInterface::get_editor_settings() {
return EditorSettings::get_singleton();
}