Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inline-debug): add visual runtime debug node #384

Closed
wants to merge 1 commit into from

Conversation

adadgio
Copy link

@adadgio adadgio commented Mar 17, 2025

Description

I found particularily useful to have a debug node easily usable inside a scene on top of the debugger to check objects current action status. This PR addresses this feature.

Usage

Slap the node anywhere in your scene, attach a tree (as exported property), and see the current sequence/action/status at runtime.

Addressed issues

  • More debug at runtime

Screenshots

Screenshot_2025-03-17_at_21_55_18 Screenshot 2025-03-17 at 21 53 56 Screenshot 2025-03-17 at 21 54 20

Notes

Please comment on this idea to make it more modular. At this stage, you can add as many PER tree, and it only shows the current sequence / action / status triple. Its movable on the stage as any Godot node.

@adadgio adadgio force-pushed the inline-debug-node branch from 8175852 to 1659dff Compare March 17, 2025 21:02
@adadgio adadgio closed this Mar 22, 2025
@adadgio
Copy link
Author

adadgio commented Mar 22, 2025

This is too complicated and there are other easier ways to to this, like this for example

class_name BeehaveInlineDebug
extends PanelContainer

@export var tree: BeehaveTree
@onready var action_name: Label = %ActionName

var current_action

func _ready() -> void:
	pass


func _process(_delta: float) -> void:
	if tree:
		current_action = tree.get_running_action()
		update_info()


func update_info() -> void:
	if current_action:
		action_name.text = "%s" % current_action.name
	else:
		action_name.text = ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant