MateiSoft wrote: "Not at load sprite, but "clone sprite".
The way you've probably already figured it out.
If the original sprite was created with LoadSprite
, this sprite has no image ID. When cloning, the image is reloaded into the cloned sprite because there is no image ID.
I don't think it's a bug. In the documentation of LoadSprite
it is already pointed out that the image is reloaded again and again. An image class is created but not passed to the image manager. The Sprite has the exclusive right to access the image.
If the sprite is deleted, the image is also deleted.
I think they wanted to leave the ID resources for the user and not "waste" them for the automatism. It's just a guess.
i personally don't think it's a big deal to make the sprite the way it's been suggested.
id = Agk.LoadSprite(Agk.LoadImage("image.png"));
or you do a little helper function.
public uint LoadSprite(string image_file, bool managed = true)
out = Agk.CreateSprite(Agk.LoadImage("image.png"));
out = Agk.LoadSprite("image.png");
Thank you for test this out.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)