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.


Topics - edb

Pages: [1] 2
1
Support / UILayout and textmeshes
« on: October 24, 2019, 08:03:41 pm »
Quick question - can tk2dUILayout resize a tk2dTextMesh?  It gets repositioned but the size/scale remains the same. 

The UIDemo #2 does not show an example doing this, all the textmeshes remain the same size when the LayoutDemo gameobject resizes.  Assuming it's not possible to resize but asking to make sure. 

2
Support / Sprite Effects/Shaders
« on: December 05, 2017, 10:06:09 pm »
I'm researching what different effects are available to apply to a tk2d Sprite.
Stuff like outlining, glows, shaders, etc.

There’s some nifty looking shader tools on the Asset Store (Shader Weaver, Amplify.)
Does anybody know if these will work with 2D Toolkit? 

Thanks!

3
Support / Changes to tk2dcamera in Editor not saving
« on: October 13, 2016, 03:34:43 pm »
I'm using Unity 5.4.1f1 and noticed that changes I make to parameters in a tk2dcamera component in the Unity editor aren't being saved. 

You can test this by loading the tk2d demo scene "11 - camera and alignment" and make some changes to some parameters in the tk2dcamera.  It seems like the changes aren't causing the scene to be marked dirty.  If you toggle the tk2dcamera component off/on, though, the scene then seems to marked dirty.

Any workarounds?  Thanks.

4
I'm tracking down stuff in the Profiler and noticed that something was creating unreferenced meshes in the Memory/Detailed/Not Saved/Mesh section.
These meshes don't seem to be ever get deleted.  I've traced it back to when I change the color of a tk2dClippedSprite with the statement theSprite.color = theColor
That in turn calls tk2dClippedSprite/UpdateColorsImpl(), which then calls Build(), and in Build() it seems is where the stray mesh is created.

I know tk2dClippedSprite is the culprit because in the Build() function of the tk2dClippedSprite I did a test with mesh.name = "Stray Mesh";  and the Profiler
showed extra stray meshes that never get deleted with those names being created every time I entered my scene.

Any ideas?  I'm on Unity 4.7.2. and 2d Toolkit 2.5.0.  Thanks.

5
I'm looking for options on how to get my game's installed on disk size on iOS smaller.  Currently the best I've found is using tk2d atlases saved as PNGs, which results in 195MB. On Android, I get a 69MB apk (using atlases saved as Unity Textures.)

I was hoping that Unity 5.3 was going to compress your player data folder, but it looks like they've changed that - now you have to be using AssetBundles to get that compression.  Is it feasible to use AssetBundles with tk2d?  I'm also using 1x2x4x platforms, if that complicates things.

They claim to be adding support to compress the player data folder in the future...maybe I should wait for that?

6
Support / Unity 5.3 LZ4 compression and Tk2d
« on: November 05, 2015, 03:41:05 pm »
Is Tk2d going to work with the Unity 5.3 LZ4 compression stuff?

I've got my Tk2d SpriteCollections set up as PNG atlases to cut down on the installed size of my game.  It'd be nice to be able to keep them as Unity texture atlases (if the LZ4 compression stuff works as I hope and compresses them on disk.)

7
Support / tk2dUIManager.Update() GC Allocs
« on: April 02, 2015, 07:59:02 pm »
I'm profiling my game on an Android tablet and found some GC Allocs of 56B in tk2dUIManager.Update() whenever I touched the screen.

I traced it down to tk2dUiManager/CheckInputs() and this call:

      foreach (Touch touch in Input.touches)

I changed it to:

        for (int i=0;  i<Input.touchCount;  i++)
        {
          Touch touch = Input.GetTouch(i);


and that made the GC Allocs go away.



8
Support / tk2dStaticSpriteBatcher - change a tk2dBatchedSprite
« on: March 26, 2015, 05:23:17 am »
I'm optimizing some stuff and giving the tk2dStaticSpriteBatcher a try.
I've got some dynamically created sprites that never need to move, rotate or scale, so I'm gonna
put those in a tk2dStaticSpriteBatcher, but they do need to occasionally change color.

Can you change the color of a tk2dBatchedSprite?  Or change the material of a tk2dBatchedSprite?
If so, how do ya do it?

Thanks!

9
Support / Dithered 16Bit_No Alpha - what happens to the alpha?
« on: March 22, 2015, 04:05:49 pm »
I've got Dithered 16Bit_No Alpha as the texture compression on a sprite collection, and as was mentioned in a previous post,
this mode is RGB565, where there are no bits for an alpha channel. 

But check this out - the textures I'm using in that sprite collection do have an alpha channel and the alpha is working - which is awesome to get rgb565 + an alpha channel, but...how is this possible?

10
Support / 16 bit Compression options - what compression is going on
« on: March 21, 2015, 11:56:35 pm »
I'm messing around with getting my sprite collections to look good with 16 bit images.  I'm experimenting with different sprite collection
16 bit compression options and am comparing those result with saving out images from TexturePacker using its dithering options
(more info at this post http://forum.unity3d.com/threads/gradient-friendy-dither-options-for-rgba-16-asset-compression.272856/)

What exactly are the compression options Reduced 16 bit, Compressed, Dithered 16 bit Alpha, Dithered 16 bit No Alpha?  And how do they correspond to TexturePacker's settings?

My guesses:
 - Reduced 16 bit-->RGBA4444 linear
 - Dithered 16 bit Alpha-->RGBA4444 FloydSteinberg Alpha
 - Dithered 16 bit No Alpha-->RGBA4444 FloydSteinberg
 - Compressed --> Unity does its normal thing, whatever that is

Am I close?  Thanks!

11
Support / Knowing when a sprite collection was loaded or unloaded
« on: March 05, 2015, 10:18:21 pm »
I'm looking for a way to know when a sprite collection gets loaded or unloaded to/from a scene.  Preferably I'd just like to be able to put a print() statement where the load/unload happens.  Anybody know where?

What I'm actually looking to do is verify that when I leave a scene, a certain sprite collection is getting unloaded, and when the next scene loads, that same sprite collection is getting reloaded again.

I'm going to make that sprite collection persist in memory and I want a way to verify that it's not hitting the hard drive and reloading every time I change scenes.

Thanks!

12
Support / Using wordWrapWidth in code
« on: February 24, 2015, 08:39:53 pm »
I need to make a textmesh's wordWrapWidth change depending on the width of something else.

I saw this from another post:

"The width parameter refers to the texture space width for the font. If your font is being displayed pixel perfect, it means the width is the number of pixels the where the line is wrapped at. The easiest way to size this is to physically move the widget in the interface. Otherwise, you will need to calculate the pixels you want to wrap at and enter that."

I guess I'm needing help with where I need to "calculate the pixels you want to wrap at".  I know the world, screen and viewpoints of where I want to wrap at, but I don't know how to get those points in terms of the wordWrapWidth.

Thanks!

13
Support / Zoom to a point when using zoomFactor
« on: February 12, 2015, 08:01:20 pm »
Anybody have any code or ideas on how to zoom in to a specific point when using tk2dCamera.zoomFactor to zoom?

When you change the value of zoomFactor, it zooms in/out on the position of the camera.
I need it zoom in on a specific point (for doing a pinch zoom on mobile devices).

Thanks.

14
Support / Huge Difference between Android and PC compiled project sizes
« on: February 09, 2015, 04:24:12 pm »
I'm making a cross-platform game (PC and Android) and heavily using Tk2d Sprite Collections with 1x 2x and 4x atlases.

The Android apk compiles to about 46 megs, which is about the size I would expect.
The Standalone project compiles to 800 megs, which is what don't understand.  Why the big difference in sizes?

When I look in the Standalone's compiled directory and in the projectName_Data folder, it seems the main culprit is
the "resources.assets" file, which is 517 megs.  The "sharedassets.assets" files are all really big, too.

Any ideas on what's going on?  Thanks.
 

15
Support / Position sprite differently when in portrait vs. landscape
« on: November 19, 2014, 12:41:09 am »
I'm working on a mobile game that allows you to play in portrait or landscape.  I'd like to position a sprite in a different place when it's in portrait mode.  Is there anything in 2d Toolkit that could position a sprite in a different place depending on portrait vs. landscape?

My backup plan is to have a PostionStuff() function that gets called when a change from portrait <--> landscape is detected, but first wanted to see if tk2d had some nifty trick.

Pages: [1] 2