♻️ Rebuild with DI
This commit is contained in:
@@ -13,7 +13,7 @@ public partial class Hud : CanvasLayer
|
||||
{
|
||||
_resourceDisplay = GetNode<VBoxContainer>("ResourceDisplay");
|
||||
|
||||
_resourceManager = GetTree().CurrentScene.GetNode<ResourceManager>("ResourceSystem");
|
||||
_resourceManager = DependencyInjection.Container.GetInstance<ResourceManager>();
|
||||
if (_resourceManager == null)
|
||||
{
|
||||
GD.PushError("ResourceSystem not found in the scene tree!");
|
||||
|
Reference in New Issue
Block a user