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 - aeiche

Pages: [1]
1
Support / Re: Issue changing sprite collections at runtime
« on: September 25, 2013, 05:45:28 pm »
None of them should be null. The array is set in the editor with the prefabs.

I can switch them to use the name, but the collections only contain 1 sprite. It does appear if I select it in the editor while its running. It pops-in.

2
Support / Issue changing sprite collections at runtime
« on: September 22, 2013, 04:58:26 pm »
I'm currently switching the player between a set of high-res avatars, each of which is contained in a different collection. I have 6 separate avatars. I get through 5 out of 6 switches just fine, but the 6th just shows up as the no sprite found texture. Unless I highlight it in the editor, at which point the sprite pops in with the correct character. The builds never show the 6th avatar.

The code looks something like this:
Code: [Select]
...
public tk2dSpriteCollectionData[] avatars;
...

public void ChangeCharacter(int i){
        character = i;
       
        playerSprite.SetSprite(avatars[i-1], 0);
}

Pages: [1]