mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
GDScript: Add @export_storage annotation
This commit is contained in:
@@ -4,14 +4,13 @@ enum MyEnum {A, B, C}
|
||||
|
||||
const Utils = preload("../../utils.notest.gd")
|
||||
|
||||
@export var x1 = MyEnum
|
||||
@export var x2 = MyEnum.A
|
||||
@export var x3 := MyEnum
|
||||
@export var x4 := MyEnum.A
|
||||
@export var x5: MyEnum
|
||||
@export var test_1 = MyEnum
|
||||
@export var test_2 = MyEnum.A
|
||||
@export var test_3 := MyEnum
|
||||
@export var test_4 := MyEnum.A
|
||||
@export var test_5: MyEnum
|
||||
|
||||
func test():
|
||||
for property in get_property_list():
|
||||
if property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE:
|
||||
print(Utils.get_property_signature(property))
|
||||
print(" ", Utils.get_property_additional_info(property))
|
||||
if str(property.name).begins_with("test_"):
|
||||
Utils.print_property_extended_info(property)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
GDTEST_OK
|
||||
@export var x1: Dictionary
|
||||
var test_1: Dictionary
|
||||
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
|
||||
@export var x2: TestExportEnumAsDictionary.MyEnum
|
||||
var test_2: TestExportEnumAsDictionary.MyEnum
|
||||
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
|
||||
@export var x3: Dictionary
|
||||
var test_3: Dictionary
|
||||
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE
|
||||
@export var x4: TestExportEnumAsDictionary.MyEnum
|
||||
var test_4: TestExportEnumAsDictionary.MyEnum
|
||||
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
|
||||
@export var x5: TestExportEnumAsDictionary.MyEnum
|
||||
var test_5: TestExportEnumAsDictionary.MyEnum
|
||||
hint=ENUM hint_string="A:0,B:1,C:2" usage=DEFAULT|SCRIPT_VARIABLE|CLASS_IS_ENUM
|
||||
|
||||
Reference in New Issue
Block a user