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

Pages: [1]
1
Support / Re: Sprite and Memory Management
« on: January 04, 2013, 04:14:02 am »
I'd like a little more clarification on this...
"All sprite collections, materials and textures are loaded with the sprite animation if they are used in the scene."

First of all, I don't change scenes at all.  The entire game is in one Unity "Scene".  Instead I'm loading screens all that have their own atlases EXCEPT for the main character which is used through all screens.  Each screen is destroyed before the next one is instantiated.  Sometimes the main character has a special animation (or more) that is only used in a single screen.  I'd like to put that animation in the SCREEN atlas/collection and not the main character animation to save memory.  Is this possible?  See below for more of a description:

Say I have a SpriteAnimation (Main Character from above) that contains animations using 5 different sprite collections.

I load up my first screen (there are NO scene changes) and I use animations from collections (atlases) 1 and 2 but not collections 3,4 or 5.

Then I close my first screen and open my second (again NO scene changes) and I use animations from collections 1 and 5 but not collections 2,3 or 4.

Third screen 1 and 3 and so on.

If I call Resources.UnloadUnusedAssets() between screen changes, does this keep the unnecessary collection atlases from being loaded into memory for each of my "Screens"?  If not is there another way to do what I describe above?  Or am I going to have to just throw everything for the "Main Character" into one sprite collection?

Happy New Year and Thanks!

2
Releases / Re: 2D Toolkit 1.76 beta 1
« on: July 19, 2012, 03:33:48 pm »
.....

Found the bug. If you update to beta2, all you need to do to fix it is add this line in tk2dAnimatedSprite.cs, line 301 -
Code: [Select]
public void Play(int clipId, float clipStartTime)
{
this.clipId = clipId; // add this line
Play(anim.clips[clipId], clipStartTime);
}

I'm transitioning over to a animationClip based system - it works like that internally now. I must've just missed that line there in the backwards compatible Play function.

Another thing which has changed is - if you call Stop(), the clipId previously would have been wiped, and the currentClip would read as null. There is now a state variable which handles this, so reading currentClip would still read as non-null. Its a subtle difference, but could affect you if you were relying on something like that. If you used isPlaying() to check if a clip is playing, then this wouldn't affect you at all.

Let me know if this works OK for you - if it does, I'll go ahead and release this as 1.76 final. This was the last issue I was waiting on.

Worked!  I'm back up.  Thanks!

3
Releases / Re: 2D Toolkit 1.76 beta 1
« on: July 18, 2012, 03:47:43 am »

...

Thanks for that I'll look into both ASAP. The is playing one is a bit more tricky, as the core system is different now. What issue are you seeing? Is it reporting playing while something isn't playing or the opposite?

The second one should be straightforward to fix.
I'll spend some time trying to figure out what is going on in debug.  Due to how I am using it I can't tell you off the top without investigation.  It LOOKS like it is reporting false when it should be true.  Like I said though... I need to verify! :)

Okay... I think I've narrowed down the problem.  It looks like .clipId is reporting incorrectly.  I'm asking for .clipId and I get zero when I should be getting 2.  I've confirmed that the object's .currentClip.name is the name for .clipId = 2 not 0 when this happens.  Does this make sense?  This one's a show stopper for me.

4
Releases / Re: 2D Toolkit 1.76 beta 1
« on: July 08, 2012, 02:17:06 am »

...

Thanks for that I'll look into both ASAP. The is playing one is a bit more tricky, as the core system is different now. What issue are you seeing? Is it reporting playing while something isn't playing or the opposite?

The second one should be straightforward to fix.
I'll spend some time trying to figure out what is going on in debug.  Due to how I am using it I can't tell you off the top without investigation.  It LOOKS like it is reporting false when it should be true.  Like I said though... I need to verify! :)

5
Releases / Re: 2D Toolkit 1.76 beta 1
« on: July 08, 2012, 01:05:48 am »
A couple of things:
1)  The new Beta 1 breaks my animations.  I think it may have something to do with IsPlaying()/Playing.  I have not been able to spend time trying to figure this out.  I went back to 1.75 due to this breakage.  If you need I can see if I can narrow down where the issue is.

2)  TK2DSpriteAnimation (This behavior is also present in 1.75 Final):
Animation does not work in the game or display properly in the inspector.
To recreate problem:
1-Create new Sprite Animation In the inspector (under TK2DSpriteAnimation)
2-Name it
3-Select "Once"
4-Make sure group is disabled (Verified that it really doesn't matter if Group is highlighted or not)
5-Select first frame (my case: "SlumsFemaleExtra2_Idle_0001")
6-Click "Add Frame"
7-Select first frame (my case: "SlumsFemaleExtra2_Idle_0002")
8-Click "Add Frame"
9-Select first frame (my case: "SlumsFemaleExtra2_Idle_0003")
10-Click "Add Frame"
11-Select first frame (my case: "SlumsFemaleExtra2_Idle_0004")
12-Click "Add Frame"
13-Select first frame (my case: "SlumsFemaleExtra2_Idle_0001")
14-Enable Group

Expected results:
-For the inspector to show all 5 frames in order of 1,2,3,4,1
-For the animation to work in gameplay

Actual results:
-Frame 2 is missing ("SlumsFemaleExtra2_Idle_0002")
-Frame 1's count is 2 frames
-Animation has weird behavior in-game  (Animation played is not the selected one)

6
Releases / Re: 2D Toolkit 1.75 beta 2
« on: June 11, 2012, 04:45:34 am »
Rockin'.

Thanks, Unikron, for the superb support on this.

You've got an excellent tool here!

7
Releases / Re: 2D Toolkit 1.75 beta 2
« on: June 10, 2012, 02:53:12 pm »
Nice!  Thanks for the update on the animation.

There seem to be a bug on that part though:
-Sometimes, when I switch to "group" mode, I lose a frame to a neighbor like so:
1)  Create new animation
2)  Make sure "group" is not toggled
3)  Select "Once"
4)  I have 15 unique frames, so set "Num Frames" to 15
5)  Set each of the 15 frames shown to each unique frame.
6)  Enable "group" so I can set the frame length required for each frame

The bug is here.  After step 6 above, the first frame in group shows a length hold of 2 frames and has swallowed up my second frame. ie the second frame that I had selected when "group" mode was off is gone and the first frame shows a hold of 2.  The names of the two frames are unique.

Also,

When group is "enabled" I don't see a way to add unique frames.  Increasing the frame count just adds frame to the last sprite.  An add button or additional dropdown in group mode to specify how many unique frames might be useful here? 

As it is now, I have to be in single mode to add all the unique frames, then switch to group to change frame counts.

8
Support / Multiple identifiable colliders for single sprite - Islands?
« on: April 20, 2012, 03:01:45 am »
I'm trying to figure out if I'm able to create multiple colliders that I can reference for different functionality on a single sprite.  Here's what  I'm trying to accomplish:

I have a single background that I want to interact with.
Exit Zones-I will have multiple polygon colliders that will trigger an "exit" from the scene
Click Zones-I need multiple polygon colliders that I'd like to register as "clickable" (raycast)
Move/Non-Move Zones-I need multiple polygon colliders that will act "no move zones"

So long story short, I need to be able to reference the collider by index or name so I know what type it is, etc.

I am able to do this outside 2dToolkit but I saw that I can add multiple collider areas using the "Island" feature in the sprite collection editor and wondered if 2dToolkit already gave me some of this functionality?

I am unable to find any discussion or documentation on the Island feature there so I'm guessing it is a new feature?  Can someone help me out with what this is for?

Pages: [1]