Hey ๐, thank you for this awesome plugin.
Right now I have the following issue: If a scene was not created yet, it cannot have NodePaths applied to its parents objects, as it was not added as a child yet. This makes it awkward to inject dependencies into scenes, because no node paths can be set. To solve this, I am using FindParent("...")
in the child scenes, so that it can then use the parents public interface to access the required dependencies. Example:
public override void _Ready()
{
Arena arena = (Arena)FindParent("Arena");
eventHub = arena.EventHub;
playersInfo = arena.PlayersInfo;
}
//Good
[OnReadyFindParent("Arena")]
private Arena arena;
//Better
[OnReadyFindParent("Arena", Property = "EventHub")]
private EventHub eventHub;
//Best
[OnReadyFindParent("Arena", Property = typeof(EventHub))]
private EventHub eventHub;