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

Pages: [1]
1
Support / Re: Disappearing Animations
« on: April 25, 2013, 05:11:08 pm »
It is definitely a problem with updating then. I upgraded to Unity 4.0.1f and TK2D 1.92final just over a month ago, and never had such problems.

2
Support / Re: Disappearing Animations
« on: April 25, 2013, 05:10:38 am »
Where is text serialization???
Unfortunately, there is no error or popup alert when the prefab gets emptied. I do not receive an error until I try playing the animation in preview. Then I get the this:

IndexOutOfRangeException: Array index is out of range.
tk2dSprite.Build () (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSprite.cs:64)
tk2dSprite.Awake () (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSprite.cs:37)
UnityEngine.Object:Instantiate(Object)
BullyController:Awake() (at Assets/My Assets/Scripts/Bully/BullyController.cs:177)

I also happened to lose more sprites again. It happened when I misclicked on a prefab. I get prompted to edit the name of the prefab but then I click on the correct prefab and then proceed to edit the animation. There seems to be some hiccup at this point which I say to my self "not again". The misclicked prefab gets cleaned, the intended prefab is safe, but for some reason other prefabs in different folders get cleaned as well(usually the animations being instantiated).

3
Support / Disappearing Animations
« on: April 24, 2013, 04:28:53 pm »
I am having a very scary issue right now. I am using version 1.92 and am a week away from release. As I dive into tweaking my animations every now and again I will receive an index out of range error and a disappearing sprite on the screen. Once I track down the sprite animation, I find that the entire animation has been deleted. Somehow and without warning the prefab's animation data gets completely wiped. The worst part is that sometimes it happens to animations that I know I have not touched in months. Luckily, I can replace the animations by overwriting the prefab with a backup of the prefab.

EDIT: On the note of backups, is there any chance of implementing a text based animation? Having hard copied text files make me feel a lot safer than guessing if a prefab is empty or not.

4
Support / Unload Resources and AssetBundles
« on: April 17, 2013, 01:31:36 am »
If I create a prefab of animated sprites and textures, and instantiate it from Instantiate( Resource.Load( prefab ) ). How do I remove all the dependencies ie textures from memory? How do I do the same thing with assetbundle after I instantiate( www.assetbundle.mainAsset ) as GameObject?

I currently have:

tk2dResource.Destroy( lepsrite );
Destroy( lesprite.gameObject );
lesprite = null;

When I profile an iOS device, I seem to be leaving some textures in memory. What am I doing wrong?

Thanks            

5
Support / Play Sprites in sync
« on: February 20, 2013, 05:06:54 am »
I am having an issue where I have two sprites played at the same time, but when I slow it down with the editor in step, I notice that the animations are off by one frame. It is seamless on the computer, but becomes obvious when pushed to an iOS device. Is there a way to play the animations at exactly the same time.

The animations are exactly the same in the editor when it comes to frame numbers, fps, etc. The only thing different is are the event frames.
I have simple code like.
Code: [Select]
void Start(){ sprite1.Play( "Run" ); sprite2.Play( "Run" ); }But instead of both updating on the same draw, I get frames where sprite1 is at frame 20 while sprite2 is at 21. It seems to always happen when changing clips during an event.

Thanks in advanced. This is literally my last hurtle with sprites in my game.

6
Support / Texture Size
« on: February 18, 2013, 04:12:25 am »
Currently I have a lot of sprites and for some reason almost everyone at least is doubles in file size when compared to the individual images.  Is there a decent way to lower the file size and keep relatively good resolution? When I try changing setting under the texture editor, the sprites go straight from awesome and huge, to pixellated and small.

I am also developing for iOS.

Thanks in advance.

7
Support / Re: How to tk2dSystem
« on: December 28, 2012, 09:53:50 pm »
Thanks for the quite response Unikron.
I have rewritten this message several times, and have diagnosed myself with newbieness. So I will just write out everything.
I have a character whose total animations' texture memory crashes the application on an iOS device. I have devised a method of having an idle animation and several special animations. While the idle animation plays the other animations' spritesheet will be unloaded or loaded based on what the character might do next. How in code would I do this? If I get the actual pointer to the spritesheet and delete/reload it would that work?

Now directly addressing your response, when and how exactly do I call Resources.UnloadUnusedAssets? Through debugging I have noticed that two copies of an atlas0 is kept in memory if one lies on/is loaded to the screen and one lies in the resource folder. So obviously, I am calling it at an inappropriate time.

If all this will be answered with 1.9 just reply with "wait until 1.9"(code example are welcomed). I have many other things to work on and can reasonably wait until the next update.

Can you supply a System demo? Like, are all the collections and sprite held within it via a guid?

8
Support / How to tk2dSystem
« on: December 28, 2012, 04:56:13 pm »
How do you use the tk2dSystem to load collections? I want to load and unload sprite collections so that I can free up texture memory when I am not using particular sprites. How would I go about doing this? Also, when I destroy a sprite collection does it also release the texture/material from memory?

9
Support / Sprite and Memory Management
« on: November 17, 2012, 03:30:29 pm »
Currently I have several sprite collections say walk, jump, fire, and dance linked to a animation collection called playeranimations. If the character is walking and I call Play( "jump" ) and then Play( "dance" ), what is still in memory? Is the previous spritesheet still in memory or do I have to release it manually? Are some of the spritesheets preloaded for speed? Just trying to figure out what is going on in the background.

10
Support / Alpha not Working on iOS
« on: October 29, 2012, 12:07:24 am »
I have three animated sprites sitting on top of each other for different animations - all with the same transform coordinates. In the simulator, when I toggle the alpha using new Color, the different sprites yield a proper animation. However when I play the animations on my iPod one of the three sprites never turns invisible. Should I be using something else besides new Color and change the alpha? Is this a 2dtoolkit error or an error in my code?

Pages: [1]