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

Pages: [1]
1
Support / Re: TileMap Problem: aabb.IsValid()
« on: March 17, 2014, 02:02:13 pm »
Thanks for reply.

The problem is only happened on chunk, not every mesh; and I think it's not a data problem, because the error not happened every time, just randomly.

And I try this:
change  tk2dTileMapMeshBuilder.cs  line 145
    var meshFilter = chunk.gameObject.GetComponent<MeshFilter>();
    meshFilter.sharedMesh = chunk.mesh;
to
   if (Application.isPlaying == false)
   {
         var meshFilter = chunk.gameObject.GetComponent<MeshFilter>();
         meshFilter.sharedMesh = chunk.mesh;
   }

Then everything works fines, no "aabb.IsValid()" anymore.

I guess it may caused by mesh.RecalculateBounds(), maybe sometimes it sucked :-\


2
Support / TileMap Problem: aabb.IsValid()
« on: March 17, 2014, 03:35:30 am »
   
    I just got a random "aabb.IsValid()" when enter my game's level,  and finally I found it's caused by tilemap's chunk;

    It seemed that the mesh of chunk is wrong, because if I replace the mesh with another(in run time), the error gone. But the default mesh of chunk is always 0 verts, 0 tris, that makes me confused.
   
    Can anyone tell me why, and how to solve it? :)

    And  my tk2d version is 2.2.3.

Pages: [1]