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

Pages: [1]
1
I shouldn't have deleted my reply.  I asked if loading a new scene also unloads unused assets.  You can see his reply "Yes" above.

2
My scene has 10 GameObjects, each a tk2dSprite.  Each one is based on a unique sprite/image and everything is arranged carefully in the scene editor. 
At scene start, there’s a 50/50 chance I want to swap each of these with a different set of 10 sprite/images. 

I’d like to only load 10 images into memory as they are very wide and tall (png’s). 

- If on ‘Start()’, I swap each of the 10 with different sprite/images, does that mean 20 images are loaded into memory, even for a brief moment? (I'm naive about how unused sprite/images unload, and if they do). 

Btw, these images are mostly set up in sprite collections by themselves because they are so big. 

3
Support / Re: check on animation
« on: June 27, 2013, 09:09:04 pm »
'theAnim' is just a string.  But you made me realize that something like this works fine

if(anim.GetClipByName(theAnim) != null)
   anim.Play(theAnim);


thanks

4
Support / check on animation
« on: June 27, 2013, 07:33:42 pm »
I play my animations happily with

anim.Play(theAnim);

...where 'theAnim' is a string I concatenate from a few different variables.  If 'theAnim' turns out not to be a proper animation, it breaks the game.  So yes, I agree that I should fix any such mistakes. 

But I want to make game breaking bugs impossible, so is there a way to check on the animation before I play it, like:

if(--check 'theAnim' exists---){
     anim.Play(theAnim);
}else{
     anim.Play("dummySprite");
}

5
Support / Re: tk2d not showing up
« on: June 11, 2013, 01:06:22 am »
Ok, didn't take long.  If I make these objects Prefabs, it works fine.  I don't mind this solution, but I wonder if I am still doing something wrong.

6
Support / tk2d not showing up
« on: June 11, 2013, 01:03:33 am »
I'm using tk2dtextMesh in a number of places.  It works great.  But when I build my project (OSX) a couple are blank.  Any obvious pitfalls that come to mind before I test further?  I don't know anything about Unity builds vs. running in the editor for starters. 

Thanks.

7
Support / Re: getting actual size from my images
« on: May 18, 2013, 04:28:55 pm »
I'm certain your math is right, but decreasing the ortho size naturally brings our view much closer to the world.  I like how everything is laid out and looks (except for the pixel issue I'm raising). 

Could I instead scale down my textures (source files) by the same proportion you brought down the camera ortho size? This way we see the same slice of the world but we can get pixel perfect?

8
Support / Re: getting actual size from my images
« on: May 18, 2013, 03:38:58 am »
The main point is that I did some decent level design before I considered the situation and I'd rather not have to scale my world way up.  It would be a pain mostly with my code.

- I have a lot of think lines in the art and I've done some tests at "actual size" (and targeting 1920x1080) and these lines look great compared to my arbitrary settings.
- I'd like to target 1920x1080.  At lower resolutions I think it's reasonable to expect things to look a little "aliased" anyway
- I made a mess, so my current camera is ortho 22
- My sprites are at an X and Y scale of 11. 
- My Sprite Collection setting is - Target Height = 640;  Target Ortho Size = 1 (I'm guessing a default as I just looked into this)

9
Support / getting actual size from my images
« on: May 17, 2013, 06:27:02 pm »
Dear Unikron,

I know you’ve explained this over and over, but I want to review for my understanding.  I want my 2d art to appear in the game as “actual size”.  I’ve chosen 1920x1080 as my ideal resolution. 

- Previously I naively made my levels with an arbitary orthographic size on my camera before I understood how all of this works.  That size value is 22.  I don't want to have to completely resize all my levels based on my mistake.

- (From people who don’t use 2dToolKit) I’ve heard how I should have made my orthographic size 540 (based on a 1080 pixel height) and built my level from there.  But 2dtoolkit is going to save me from fully revamping my level, right?!?

- I’m ready to fix my mess.  With my sprites’ scale set to 1, I would like my textures (tk2dSprites) to show up at their actual size.  I should be able to go in to my Sprite Collections settings and set “Target Size” to 1080 and “Target Ortho Size” to 22?

- Then all my sizing concerns should happen in Photoshop, so that I can have confidence that my textures as exactly as big as I want them to be (for 1920x1080)

Am I understanding this?

Pages: [1]