Is there a bug in the custom property description?

Godot Version

4.2.1.stable

Question

Why does the custom property description disappear when you use an export_category?

Figure 1: Here I add a description to the export var speed.

##How fast the enemy will move along the path
@export var speed : float = 5

Figure 2: Now I add an export category above the export var speed and the description is now empty.

I tried reloading the current project but this didn’t fix the description. Am I doing this wrong?

Hey. It might need a space:
## Space then your comments

I have also found that restarting Godot helps.

hth

1 Like

Thank you for your reply. I tried your solution, but it doesn’t seem to work for me.
(restart + space)

Try leaving a blank line before the comment line. So insert blank between 3 and 4.

I gave it a shot, but it didn’t work either. I even restarted Godot.

Darn…

Can you post the entire script?

Also, are there any errors (in red) because that can stop the doc strings working too.

Nope, no errors or warnings.

extends PathFollow3D

@export_category("EnemyMovementStats")

## How fast the enemy will move along the path
@export var speed : int = 5

## How much damage the enemy deals
@export var damage : int = 1

@onready var base = get_tree().get_first_node_in_group("base")

func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
	move(delta)
	if progress_ratio == 1:
		deal_damage()
		set_process(false)

func move(delta : float) -> void:
	progress += (speed * delta)

func deal_damage(dmg : int = 1):
	base.take_damage(dmg)
	die()

func die():
	queue_free()

Thank you for your time.

I’ll give it a go with your version.

1 Like

Changed the code to export_group and it works. Go figure!

Maybe worth posting a bug if you have time.

extends PathFollow3D

## Category <-- made this a Group instead
@export_group("EnemyMovementStats")

## How fast the enemy will move along the path
@export var speed : int = 5

## How much damage the enemy deals
@export var damage : int = 1
1 Like

Yes! This worked. Thank you.

1 Like

Yay!!!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.