Skip to content

BTRoot : set actor_path from script instead of Inpesctor cause underlying _actor to be always null #4

Closed
@Earewien

Description

@Earewien

Scenario:

  • create a BTRoot, and do not assign the actor path from Inspector
  • in script file, add root as a child of another node in scene tree
  • assign BTRoot actor_path from script

This result in a null actor at runtime

Analysis:
In BTRoot, the underlying _actor variable is updated when actor_path changes in inspector (from update_warnings), or in ready function when checking node validity.
Changing actor_pass after _ready function has no effect. In actor_path setter, underlying _actor should be updated.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions