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.


Messages - K0mix

Pages: [1]
1
Support / Re: set sprite
« on: September 12, 2013, 08:16:37 pm »
oh I figured it out. I needed to drag the object inside the sprite collection folder on the script! what I did was add a new component spritecollectiondata to the collection and then drag the collection onto the script and that was wrong.

oh well thanks for the help.

2
Support / Re: set sprite
« on: September 12, 2013, 04:35:53 pm »
I used your code as it is and i get this error.

IndexOutOfRangeException: Array index is out of range.

the problem is not with the script but with setting up the collection so it can be accessed by the script.
no I am not using platform sprites, what does it mean?

3
Support / Re: set sprite
« on: September 12, 2013, 08:31:08 am »
I can't figure it out, no matter how I set up this collection I drag it into the variable, and call for mysprites "ball" and it just doesn't exist in the collection. it always returns an empty but existing sprite collection. what could I be doing wrong?

4
Support / Re: set sprite
« on: September 08, 2013, 06:49:42 pm »
no the spelling seems fine. and mysprites.spriteDefinitions.Length returns 0

the sprite collection has 2 sprites in it. what can i change so this will work? it must be one of the options of the sprite collection

5
Support / Re: set sprite
« on: September 08, 2013, 05:40:24 pm »
ok very good now I have another problem however: sprite not found in collection: ball

there is definitely the sprite ball in the collection so I must ve set something up wrong.

do I need to set any of the parameters for this purpose?

6
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]