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

Pages: [1] 2
1
Support / Re: How to reduce project exe and data size?
« on: February 23, 2012, 11:20:47 pm »
Thanks!  I didn't even think to look in the Edit settings.

2
Support / Re: How to reduce project exe and data size?
« on: February 23, 2012, 09:20:45 pm »
Thanks for all the info.  I'm still not closer to getting those atlas sizes down though, so I'll have to keep looking at it.

How do I enable dicing on the textures?  Is it something I do when creating the sprite collection (since it changes the way the sprite is saved in the atlas)?

3
Support / Re: Is it possible to create an animation via code?
« on: February 23, 2012, 09:18:08 pm »
thank you.  I will look at this today and let you know how it goes :)

4
Support / Re: Is it possible to create an animation via code?
« on: February 22, 2012, 11:52:32 pm »
I have 30 different animations to make, but they all use exactly the same sized spritesheets, in exactly the same layout.  Making them manually is incredibly tedious, and if I make a mistake (which I've done), I have to do them over again.  If I could do it in code, it would be a matter of incrementing a couple of variables for each one and calling the same function.

For me, it would be a huge time saver.  Whether it would make a different to project size and performance (both very important) would also have to be taken into account.

5
Support / Re: Loading and unloading of resources
« on: February 22, 2012, 11:47:20 pm »
I don't have it yet, but I will down the track.

6
Support / Is it possible to create an animation via code?
« on: February 22, 2012, 10:26:25 pm »
This post has been really helpful, but I'm wondering if I can take it further.  Is it possible to create the anim via code - selecting the sprite collection, setting up the clips, listing the frames for each clip?  I had a go, but I got as far as not being able to create a tk2dSpriteAnimation using new because it's a MonoBehaviour and needs to be attached as a component.  At this point, I'm trying to create the animation so I can attach it to objects as a component.

7
Support / Re: Loading and unloading of resources
« on: February 22, 2012, 10:21:56 pm »
thanks for that.  I'm still getting familiar with Unity - need to figure out tracking memory usage.

8
Support / Re: How to reduce project exe and data size?
« on: February 22, 2012, 10:17:04 pm »
okay ... if the atlas is less than 50% used, why didn't it size it to 1024x2048?  All others ended up around those dimensions.  Maybe slicing the image would let it do that, but I haven't seen an option to slice in the sprite collection - only to add a sliced sprite as an object.  Can you tell me how to tell the sprite collection to slice them?

This NPOT ... if Unity upscales, is that going to cause the graphics to be blurry?  This is a problem I've had, and not been able to figure out why.  But they don't seem to be distorted in any way, which is what I'd expect if that were happening - there would be stretching in one direction, wouldn't there?  Is the solution to make sure the source image is a power of 2 before putting it into the sprite collection?  So I could just add transparent edges?  That approach wouldn't work, though, for spritesheets.  What would you suggest as the solution?  The sprites are all from an existing game in another engine.

9
Support / Loading and unloading of resources
« on: February 22, 2012, 02:36:29 am »
I am instantiating animated objects from prefabs, then using Resources.Load() to change the animation.

If I do this in a loop and create 10 objects, is the resource actually loaded 10 times, or just once, and all objects use the same animation?

Do I have to do anything to unload the resource when the scene changes, or will all of the objects being destroyed trigger garbage collection on the animation?

10
Support / Re: How to reduce project exe and data size?
« on: February 22, 2012, 12:49:05 am »
For that particular file, the atlas is 2048x2048, made up of 3 textures which are 1024x768, 1024x768 and 640x480.

Another file with just a few images is 1024x2048 (10.7MB) for the atlas, made up of 1024x768, 129x300 and 870x325 (total 4.2MB).

I notice my source sprites all have NPOT next to them.  What does that mean?  I got them into the project just by dragging them from an external folder onto the project panel.

Attached are my sprite collection settings, in case it helps.

11
Support / Re: How to reduce project exe and data size?
« on: February 21, 2012, 01:57:18 am »
Well, the editor log shows that none of the original textures are being included in the build.  However, if I choose a sprite collection that has only 3 sprites, the total size of the individual sprites is 7MB.  The atlas texture in the sprite collection is 21.3MB.

The atlas is uncompressed ... I already see a loss of quality with the images in Unity compared with the original sprite - I'm not sure why - and I don't want any further deterioration with quality.

12
Support / Re: How to reduce project exe and data size?
« on: February 20, 2012, 09:13:19 pm »
Thanks for the explanation.

According to the docs, as long as I'm only using my original sprites in sprite collections and not in any scenes, they will not be included in the build.  But I'll check the log and see if that's happening.

Is it usual that the sprite collection takes up more space than the original sprites?  With the extra unused area on the texture (most of mine are about 43% unused), plus whatever files are necessary to create the atlas and animation, I imagine that's a possibility.

13
Support / How to reduce project exe and data size?
« on: February 20, 2012, 05:22:49 am »
I am porting a game to Unity that was originally made with TGB. 

In TGB every image was a separate png file, and levels were built via code rather than saved as scenes containing the images.  The resulting exe is 1.5MB and the entire game folder is 22MB.

In Unity, I've imported all the assets into the project folder and put all of the sprites into sprite collections (I took mostly the default settings, other than changing the anchor point and collision box).  Most of the sprite collections generated a 1024x1024 or 1024x2048 sheet.  When I build the game (again using the default build options), the exe is 8.1MB and the entire game folder is 85.9MB.

This is a HUGE difference, and there is a LOT still to be added to the Unity version (animations, audio, lots more code).  Just the sharedassets files combined are twice the size of the entire TGB game.  I don't know where to begin looking to get the size of the exe and project down.  Is this big difference something that's standard with Unity, or peculiar to the 2d toolkit?  Can I load the sprite collections and animations at runtime, or does Unity already do that?  Any ideas what things I can change to reduce these numbers?

14
Support / Re: Commit and Edit buttons disappeared from sprite collection
« on: February 17, 2012, 08:08:00 pm »
hehe - yeah ... moment of panic over :)

15
Support / Re: Commit and Edit buttons disappeared from sprite collection
« on: February 17, 2012, 03:56:12 am »
ah, never mind.  I figured it out.  It shows that way when you're viewing the inspector in Debug mode.  As soon as I switched back to normal, the buttons reappeared.

Whew!

Pages: [1] 2