Creating Sprite Unity3d -


please tell me, easiest way programmaticaly create tk2dsprite in toolkit2d(unity)? have .png image in assets/image sprite must created. want create sprite, , show on scene.

i not @ computer try (c#):

string spritename = "spriteinspritecollection"; gameobject spriteobject = new gameobject(); tk2dsprite spritecomponent = spriteobject.addcomponent<tk2dsprite>(); spritecomponent.setsprite(spritename); 

i test , see if component created , initialized sprite before adding object can't right now, points in right direction though.

edited include improvement slxs.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -