Document exporting nested subgroups

This commit is contained in:
Danil Alexeev 2024-10-28 18:32:50 +03:00
parent 0f5f3bc954
commit 4d3e2c78b6
No known key found for this signature in database
GPG Key ID: 5A52F75A8679EC57

View File

@ -666,7 +666,19 @@
@export var car_label = "Speedy" @export var car_label = "Speedy"
@export var car_number = 3 @export var car_number = 3
[/codeblock] [/codeblock]
[b]Note:[/b] Subgroups cannot be nested, they only provide one extra level of depth. Just like the next group ends the previous group, so do the subsequent subgroups. [b]Note:[/b] Subgroups cannot be nested, but you can use the slash separator ([code]/[/code]) to achieve the desired effect:
[codeblock]
@export_group("Car Properties")
@export_subgroup("Wheels", "wheel_")
@export_subgroup("Wheels/Front", "front_wheel_")
@export var front_wheel_strength = 10
@export var front_wheel_mobility = 5
@export_subgroup("Wheels/Rear", "rear_wheel_")
@export var rear_wheel_strength = 8
@export var rear_wheel_mobility = 3
@export_subgroup("Wheels", "wheel_")
@export var wheel_material: PhysicsMaterial
[/codeblock]
</description> </description>
</annotation> </annotation>
<annotation name="@export_tool_button"> <annotation name="@export_tool_button">