diff --git a/Library/Singletons/GifManager.cs b/Library/Singletons/GifManager.cs index ca5d889..04f89b6 100644 --- a/Library/Singletons/GifManager.cs +++ b/Library/Singletons/GifManager.cs @@ -7,11 +7,12 @@ public class GifManager private static GifManager? _instance; public static GifManager Instance => _instance ?? (_instance = new GifManager()); - private Node _gifManager; + private GodotObject _gifManager; public GifManager() { - _gifManager = ((SceneTree)Engine.GetMainLoop()).GetRoot().GetNode("GifManager"); + _gifManager = Engine.GetSingleton("GifManager"); + //_gifManager = ((SceneTree)Engine.GetMainLoop()).GetRoot().GetNode("GifManager"); } public AnimatedTexture AnimatedTextureFromBuffer(byte[] data, int max_frames = 0) => _gifManager.Call("animated_texture_from_buffer", data, max_frames).As();