Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - K0mix

Pages: [1]
1
Support / set sprite
« on: September 08, 2013, 03:22:55 pm »
I just started Using Unity and toolkit 2d.

I ve figured out some basics about how to work with sprites, but I havent figured out how to attach them newly to the scene with code.

the code should look somethign like this
Code: [Select]
void create(){
var target = new GameObject("sprite1");
var sprite = trg.AddComponent<tk2dSprite>();
sprite.setSprite(mysprites,"ball");
}

now the problem with this is I don't know how to properly access the sprite collection (mysprites) I have set up.
how would I refer to the sprite collection properly?

Pages: [1]