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

Pages: 1 [2] 3
16
Support / Re: Animated Tilemap Script
« on: August 02, 2016, 03:13:59 am »
Hi

Do you know what the performance of this is like on mobile?

I'm concerned about the material count needed to achieve rich animation being too much for ipad 3 (which I'm targeting).
For that reason I'm leaning towards trying the spriteId swapping method linked to in the OP.

Any ideas or recommendations here?

thanks!

Not a clue as to the performance in mobile; but material count in the other method can definitely be a bit much.
If you manage to get the method I linked in the OP working; would you mind sharing how you did it?

17
Support / Re: Animated tiles and a suggestion
« on: July 11, 2016, 11:38:19 pm »
Thanks for this, this solution looks exactly like what I need. Trying to use materials and shaders for my fairly basic tileset animations is very quickly growing unwieldy with multiple identical animations per tilemap. (Also, my animation UVs break every single time I add or remove tiles from the spritesheet in question, making the entire process super frustrating...)



@ComputerNerd

I run into errors whenever I try this:

Code: [Select]
Class: tk2dSpriteCollectionBuilder
Function: UpdateVertexCache
Code location: Directly above the line:
coll.spriteDefinitions.normalizedUvs = CalculateNormalizedUvs(uvs);
Code:
   if (gen.textureParams.UseCustomUV)
   {
      coll.spriteDefinitions.uvs = gen.textureParams.CustomUV;
      for (int l = 0; l < coll.spriteDefinitions.uvs.Length; l++)
      {
         coll.spriteDefinitions.uvs[l] = coll.spriteDefinitions.uvs[l] + gen.textureParams.UvOffset;
      }
   }

into the specified script.

Quote
Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs(1935,55): error CS1061: Type `tk2dSpriteCollectionDefinition[]' does not contain a definition for `UseCustomUV' and no extension method `UseCustomUV' of type `tk2dSpriteCollectionDefinition[]' could be found (are you missing a using directive or an assembly reference?)

Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs(1938,50): error CS1061: Type `tk2dSpriteDefinition[]' does not contain a definition for `uvs' and no extension method `uvs' of type `tk2dSpriteDefinition[]' could be found (are you missing a using directive or an assembly reference?)

Any ideas?

18
Support / Re: Animated Tilemap Script
« on: June 29, 2016, 10:22:24 pm »
@ComputerNerd

Thanks a bunch for the tips! Using a shader does seem a bit easier to go about this task.

I have run into a few weird snags, though, as the animations are tilted 90 degrees when I paint them, and they also don't seem to be as wide as they should be.
Using the in-editor tool, I can correct the tilt, but they still seem squashed, resulting in the odd spaces of empty space between each tile as seen below.

http://i.imgur.com/2GS4g0n.png

I'm assuming your custom UV coordinates change would eliminate that, or is this problem something different?

EDIT:

Ah, found the cause! The placeholder sprite dimensions/transparency were influencing the animations. All fixed now, thanks for the help.





19
Support / Animated Tilemap Script
« on: June 29, 2016, 03:56:13 am »
I was searching around for an easy method to allow for some very simple, 1-10 frame looping animations in a tileset in 2DTK.

I eventually came across this script, but despite me setting it up; it doesn't actually appear to work. https://gist.github.com/treefortress/2c9b034e696953bd83fc

It's a few years old; could it be using depreciated code or referring to 2DTK classes that no longer work? Has anyone else had luck using it?

Any help is appreciated.

20
Support / Garbled Tilemaps (SOLVED)
« on: January 18, 2016, 05:51:42 am »
I'm having an issue where I have a large tilemap image (set as a spritesheet). I'm continually revising and overwriting the image with new tiles, but not actually changing the image size at all.

Normally I don't have many issues, but for some reason when I need to delete a bunch of unused tiles from the image and replace it with other, different tiles; when I overwrite the image in the project, the tilemaps using said spritesheet in the project become impossibly garbled for some reason.

Is there any reason why this would be happening?

EDIT:  Disregard, stupid mistake on my part. Just a few layers on that weren't supposed to be on.

21
Support / Re: Errors updating to 2.5 for Unity5
« on: March 07, 2015, 08:03:51 pm »
No duplicate files, but removing 2DTK entirely from the project and then reimporting it seems to have done the trick. Good enough for me!

22
Support / Re: Errors updating to 2.5 for Unity5
« on: March 07, 2015, 08:33:13 am »
I am getting similar errors. Newly converted project to Unity 5. Downloaded 2.5 from the releases thread and updated...


Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs(8,29): error CS0101: The namespace `tk2dRuntime.TileMap' already contains a definition for `BuilderUtil'
Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapChunks.cs(8,22): error CS0101: The namespace `tk2dRuntime.TileMap' already contains a definition for `LayerSprites'
Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapChunks.cs(18,22): error CS0101: The namespace `tk2dRuntime.TileMap' already contains a definition for `SpriteChunk'
Assets/TK2DROOT/tk2dTileMap/Code/tk2dTileMapChunks.cs(83,22): error CS0101: The namespace `tk2dRuntime.TileMap' already contains a definition for `SpriteChannel'
...

Actually, these errors seem to be present even when using my earlier version of 2DTK, when updated to Unity 5.
Any idea as to what may be causing these?

23
Support / Using 2DTK Sprites in new Unity 4.6 GUI (SOLVED)
« on: September 09, 2014, 12:53:11 am »
Is it possible to place 2DTK Sprites/Animators within the canvas? I'm just messing around with the beta to see what can and can't be done; and I noticed
that 2DTK (perhaps obviously, in hindsight) doesn't render; is/will this be possible?

EDIT: Ah ha; nevermind! Using the 4.6 GUI in Screen Space Overlay won't render 2DTK Sprites... but using Screen Space- Camera will!

24
Releases / Re: 2D Toolkit 2.4.0
« on: April 17, 2014, 06:02:42 pm »
Any chance of Multiple color channels for Tilemaps making it in soon? Any game making use of tilemaps could really use the versatility in painting.

25
Support / Calling SFX with Animation Triggers
« on: February 10, 2014, 05:46:29 pm »
Hello,

Might there be any example or reference scripts floating around regarding playing sound files on specific frames of an animation? (Using the animation triggers?)
I'm an absolutely abysmal scripter, so any sort of example would help; couldn't really find a similar thread on the forum.

26
Releases / Re: 2D Toolkit 2.2.3
« on: October 17, 2013, 09:07:18 pm »
Awesome; thanks for the quick fix.

27
Releases / Re: 2D Toolkit 2.2.2
« on: October 17, 2013, 04:35:27 am »
I am also getting a similar error:

Quote
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[tk2dRuntime.TileMap.Layer,System.Boolean].get_Item (tk2dRuntime.TileMap.Layer key) (at /Applications/buildAgent/work/84669f285f6a667f/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150)
tk2dRuntime.TileMap.BuilderUtil.CreateRenderData (.tk2dTileMap tileMap, Boolean editMode, System.Collections.Generic.Dictionary`2 layersActive) (at Assets/TK2DROOT/tk2d/Code/TileMap/tk2dTileMapBuilderUtil.cs:317)
tk2dTileMap.Build (BuildFlags buildFlags) (at Assets/TK2DROOT/tk2d/Code/TileMap/tk2dTileMap.cs:276)
tk2dTileMap.EndEditMode () (at Assets/TK2DROOT/tk2d/Code/TileMap/tk2dTileMap.cs:486)
tk2dTileMap.Awake () (at Assets/TK2DROOT/tk2d/Code/TileMap/tk2dTileMap.cs:121)
UnityEditor.DockArea:OnGUI()

There's no code going on with it; just straight up vanilla 2DTK tilemaps.

Usually the error is accompanied by a jumbled tilemap. If I find the correct tilemap in the scene and recommit, it will seemingly fix itself. It also appears to be the same exact sprite map, the same collection; other collections are not affected. Not entirely sure, but I believe the error began happening at or around when I added an additional layer to the tilemap in question...

28
Support / Re: Problem With Particle System
« on: August 31, 2013, 10:33:51 pm »
OmegAlpha,

Was having similar trouble, try checking the Sorting Fudge in the Renderer of the particle system and messing around with it; fixed my problem.

29
Is it possible in any way to use Unity's default animation editor to change an object from one sprite to another sprite, or changing to different animations?
Currently you only have access to the color channels and 'Play Automatically.' I ask because some of the framework I'm using are limited to using Mecanim or Legacy animations
in the workflow; so code-based isn't too viable an option. Is there an editor extension or alternative method that would make this possible?

30
Releases / Re: 2D Toolkit 2.1 beta 1
« on: July 14, 2013, 12:13:16 am »
Oh good; came to report that very collision issue, glad to see that it's already been taken care of. (As well as the problem of being unable to erase some tiles)

Pages: 1 [2] 3