Fixed GIF Manager
Fixed fetching of GifManager from singelton, instead of as a node.
This commit is contained in:
parent
8f1d66da1b
commit
93f5b3dec9
1 changed files with 3 additions and 2 deletions
|
|
@ -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<AnimatedTexture>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue