Hello Guest

Recent Posts

Pages: [1] 2 3 ... 10
1
Support / tk2d animated sprites occasionally invisible on WebGL build
« Last post by csumsky3 on January 19, 2017, 06:36:13 PM »
Hello!

So this issue is really hard to track down, so mostly I'm just wondering if anyone's seen it before.

First, some background. I have a 20-Level game, each level a separate scene, each utilizing tk2d's TileMap to build out the levels. Player Character, Enemies, and everything else gameplay-related is atlased, animated and rendered via tk2d (UI is handled through Unity's UI system, and the sprites are thus not going through tk2d, but UI really has nothing to do with this issue, so I don't think that info is that relevant).

Ok so the issue. When I'm playing the WebGL build that's staged on a server, running in a browser (I mainly test on Chrome, so that's all I've confirmed it happening in so far), after I've been playing the game for a long time, some animated enemy sprites will suddenly be invisible when the scene loads. They're still be there, attacking me and colliding with me, but the sprites just don't show. I don't think it's a layering or sorting issue, as the issue is random and the same enemies that were showing fine a playthrough before will now be invisible. Also, once I start seeing invisible enemies, if I die and respawn (which reloads the scene), the player character will now be invisible as well. Once the issue starts showing, the only way I can fix it is by refreshing the page from the browser - switching / reloading scenes doesn't fix it. One thing to note is that it only seems to happen with animated sprites.

If I inspect the browser once the issue starts, the console isn't that helpful. But I'll be sure to follow up if I see anything that might be useful (I'm about to start another playthrough to test for the issue). Anyhow, quite a weird one! Any insight or help would be greatly appreciated!

Cheers
2
Support / Re: Syncronize Multiple Atlases
« Last post by mWundke on January 17, 2017, 03:38:22 PM »
3
Support / Syncronize Multiple Atlases
« Last post by mWundke on January 17, 2017, 03:15:35 PM »
Hi there,

I was trying to get multiple atlasses (mainly for normal maps, highlights and more advanced shader effects) working together but I haven't seen how. I searched the forum a bit and found that it should be possible using synchronised atlas generation (http://2dtoolkit.com/forum/index.php/topic,3257.msg17012.html#msg17012), while I've not seen it in the documentation.

Could you outline the workflow I should follow for it?

Cheers,
Moss
4
Support / Re: tk2dSprites render pink when changing scene / using LoadScene
« Last post by oug on January 17, 2017, 08:18:56 AM »
Hi all,

Sorry for the late reply, I just received a notification on a new post and I didn't see the post of madfatcat, sorry. Anyway, I've been in contact with unikron and we've come up with the following solution:

Quote
Got to the bottom of it. Basically tk2d has a watcher to help unload unused textures when a scene has changed (Unity didn't do a great job with that and basically ended up running out of memory...) when platform collections are used.

So, whats happening here is -
1. Sprite starts up
2. You grab material that gets spawned
3. Listener destroys material
4. Turns pink

If you don't have any issues with memory you could try turning it off tk2dEditorSpriteDataUnloader, comment out the first line. If you do there might be other not so pleasant ways around this.

You can try this, it seemed to work for me. For those concerned about memory load unikron mentioned:

Quote
Disabling the tk2dEditorSpriteDataUnloader shouldn't cause any major issues in 64 bit versions of Unity (i.e. 5.x), it is there to reduce memory consumption in 32 bit versions.

It looks like the when SpriteDataUnloader runs has changed in 5.3. Nothing to worry about - I'd just leave it off until (if ever) it becomes an issue. Basically its supposed to unload all materials when a scene is unloaded, but Unity 5.3 introduced multiple scene loading and this is now moot because of that.

Hope to have helped some! Good luck and happy devving!
5
Support / Re: tk2dSprites render pink when changing scene / using LoadScene
« Last post by Doghelmer on January 16, 2017, 07:18:58 PM »
I'm getting the same issue -- VERY occasional instances where objects are surrounded by pink squares -- and am curious if this was ever resolved.  I was able to alleviate the issue by setting the SharedMaterial in a script every time I change the sprite, but it still appears to be happening sometimes.
6
Support / Re: Tilemap disappears in Windows (32-bit) build.
« Last post by Doghelmer on January 16, 2017, 07:11:31 PM »
I'm actually having the same issue when I build a 64-bit version.  I'd like to try and get a reproducible version for you when I get some time, my testing indicates it's going to be tricky to repro in an isolated environment.

In the meantime, this puts me in a bit of a bind because I may be releasing a game soon.  I attempted to revert back to the previous version 2.5.6, but started seeing a new issue in that version: Whenever I Commit a Sprite Collection, something seems to happen to the files so that instead of looking like this:
http://i.imgur.com/mNL0EJI.png

They look like this:
http://i.imgur.com/1w5D6fl.png

In the first example, the texture type is "Sprite (2D and UI)", which is what I need.  In the second, it's just "Default".  When I try to convert the image to "Sprite (2D and UI)", it doesn't work, it just immediately converts back to default.

This is using 2.5.6 on the latest version of Unity.  Any ideas on a quick workaround for this?
7
Support / Re: Tilemap disappears in Windows (32-bit) build.
« Last post by unikronsoftware on January 12, 2017, 11:13:54 PM »
I am unable to reproduce this - can you please email a simple repro case to support at unikronsoftware.com?
8
Support / Re: CurrentSprite.GetUntrimmedBounds() Gives wrong center
« Last post by yo_milo on January 12, 2017, 07:12:15 PM »
CurrentSprite.GetBounds returns bounds in local space to the sprite. You should use renderer.bounds, that returns an AABB in world space. I'm assuming your position variable is in world space

Thank you, I assumed I had to use the mesh renderer, but initially i thought tk2dsprite had a built in parameters for bounds.

Thank you.
9
Support / Tilemap disappears in Windows (32-bit) build.
« Last post by Silverfell on January 12, 2017, 01:54:13 PM »
Hi. I'm putting the finishing touches to my game, which in the editor looks like the screenshot tilemap_present.jpg - nothing special, just a tiled game.

Sadly, since the latest tk2d update, when I build for Window, the game looks like tilemap_missing.jpg - you can see that the TK2D system is present and working because the fishes and main character are rendered on it, but the tilemap is missing. What's even more confusing is that objects placed in the tilemap and spawned at start, like the spikes and background fishes, actually are present.

I built in debug mode and without, I have no errors or warnings in the console. Previous builds for Windows, made in 2.5.6 work fine. At this point, is this something you can fix quickly, or shall I just try to revert my TK2D setup?
10
Support / Re: CurrentSprite.GetUntrimmedBounds() Gives wrong center
« Last post by unikronsoftware on January 12, 2017, 09:47:14 AM »
CurrentSprite.GetBounds returns bounds in local space to the sprite. You should use renderer.bounds, that returns an AABB in world space. I'm assuming your position variable is in world space
Pages: [1] 2 3 ... 10