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

Pages: [1]
1
Support / I'm getting a bunch of errors when I upgraded Unity to 5.1
« on: June 19, 2015, 02:06:49 am »
I just upgraded to 5.1 for Unity. I now get a bunch of errors when compiling the 2D toolkit. Errors like this:
Error   253   The type or namespace name 'tk2dUIManager' could not be found (are you missing a using directive or an assembly reference?)

There are well over 350 errors so it looks like most of the classes are just not being compiled.

In particular an error like this caught my eye in this line:
allTransforms = (from t in allTransforms where t != batcher.transform select t).ToArray();

The error is:
Delegate 'System.Func<UnityEngine.Transform,int,bool>' does not take 1 arguments   


2
For anyone who is interested, I posted a comprehensive guide to dynamically creating a TileMap here: http://praveenangyan.com/2014/03/02/dynamically-displaying-a-level-with-tk2dtilemap-in-2d-toolkit-for-unity/

3
When I use a pixel per meter setting of 100, TileMap works perfectly. However I create a camera with a pixels per meter setting of say 20 and then create a spritesheet I get the following overlap in the tiles in my TileMap:



I'm dynamically loading up my TileMap using the following code:
    // Use this for initialization
    void Start()
    {
        Map map = new Map("Assets/Levels/test-load-level.tmx");
        tk2dTileMap tk2dTileMap = GameObject.FindObjectOfType<tk2dTileMap>();

        for (int layerIndex = 0; layerIndex < map.Layers.Count; layerIndex++)
        {
            foreach (Tile tile in map.Layers[layerIndex].Tiles.Values)
            {
                // Tiled's Gids are 1-based whereas 2D Toolkit's tiles are 0-based
                tk2dTileMap.SetTile(tile.X, tile.Y, layerIndex, (int)tile.Gid - 1);
            }
        }

        tk2dTileMap.ForceBuild();
    }

4
Support / Dynamic TileMap generation
« on: January 15, 2014, 08:12:42 am »
Right now if I want to dynamically populate a TileMap during runtime, I have to do the following steps:

1) Create an empty TileMap with the largest conceivable size I will be using.
2) Create as many empty layers as I need in this empty TileMap.
3) Create other empty TileMaps if layers use different Tilesets. In other words create a new TileMap for each Tileset I am using.

Is this correct?

5
Support / I cannot view the drawing toolbar for the TileMap editor.
« on: January 12, 2014, 09:26:06 am »
The tutorial shows me a toolbar that should pop up: http://www.unikronsoftware.com/2dtoolkit/doc/2.10/tilemap/tutorial.html (under Part 2 - Basic painting). However I cannot see this toolbar at all. What do I have to do to get it to show up?

Pages: [1]