Hi,
I want to download and draw an image every now and then. Therefore I need to add an image to a SpriteCollection. The example in the demo uses an already pre-worked image. I need to be able to add an plain .png to the collection. Does someone know how to do this? (And is it possible to save these in that collection so I can use these the next time the program is started?)
[EDIT]: Okay, so I've found how to load and draw an image with 2DToolkit:
Texture2D tex = (Texture2D)Resources.Load("Image");
GameObject go = tk2dBaseSprite.CreateFromTexture<tk2dSprite>(tex, tk2dSpriteCollectionSize.Explicit(1, tex.height), new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0));
Instantiate(go);
But I feel like this isn't the 'right' way to go. It is not really using the mechanics of 2dToolkit. How can I integrate this more? For instance I really need the dimension in pixel units function, which seems to be missing right now.
V1ncam