Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertex numbers in meshes changing into "Infinity" or "NaN" after export #188

Open
hengde opened this issue Jun 24, 2019 · 2 comments
Open

Comments

@hengde
Copy link

hengde commented Jun 24, 2019

Several weeks ago I started having an issue with the export process. Other team members are not having this issue, but unfortunately I am both in another city, and the main person using tiled to update our game's maps.

If I make any change to one of our maps' tile layers and then export with Tiled2Unity, it turns the numbers in the .obj files to NaN or infinity. Here is a diff from sourcetree:

 
 # Vertices (Count = 4)
-v 0 -10 0
-v -1920 -10 0
-v -1920 1070 0
-v 0 1070 0
+v NaN -Infinity 0
+v -Infinity -Infinity 0
+v -Infinity Infinity 0
+v NaN Infinity 0
 
 # Texture cooridinates (Count = 4)
 vt 0 0

Here is the TMX file, but this is happening to any TMX file I try to edit.

In Unity, there are no errors running the map, but every tile in a tile layer turns black. Our player spawns correctly (in the position specified in tiled) and is controllable, text appears, in-game objects controlled by tiled objects appear, and the platforms are collidable and in the correct places.

I've tried uninstalling and reinstalling our entire repo and both tiled and tiled2unity several times with no luck. I've tried exporting with both tiled2unity versions 10.13 and 10.13.2. I'm running OSX mojave 10.14.2 on a MacBook Pro (Retina, 15-inch, Mid 2014).

Any help is greatly appreciated, thanks in advance.

@Seanba
Copy link
Owner

Seanba commented Jun 24, 2019

Hi there, @hengde. What are you using for a Pixels Per Unit setting? It sounds like a value of zero is being used. Can you paste the contents of the log from the Tiled2Unity exporter?

@hengde
Copy link
Author

hengde commented Jun 24, 2019

Yep that was it. Can't believe I missed it, I guess the export button was so big I couldn't see anything else :)

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants