Example:
import { GArray, GDictionary, Node, PropertyUsageFlags, StringName, Variant } from "godot";
import { Tool } from "godot.annotations";
@Tool()
export default class Test extends Node {
testField: number = 0;
_get_property_list(): GArray<GDictionary> {
console.log("_get_property_list"); // This log is not be printed.
const ret = new GArray<GDictionary>();
ret.push_back(GDictionary.create({
name: "test",
type: Variant.Type.TYPE_INT,
usage: PropertyUsageFlags.PROPERTY_USAGE_DEFAULT,
}));
return ret;
}
_set(property: StringName, value: any): boolean {
if (property === "test") {
this.testField= value;
return true;
}
return false;
}
_get(property: StringName) {
if (property === "test") {
return this.testField;
}
return null;
}
In this example, the property "test" can not be recognized and shown in inspector.
It seems that _get_property_list() is not be executed.
Example:
In this example, the property "test" can not be recognized and shown in inspector.
It seems that
_get_property_list()is not be executed.