ozRocker Posted July 16, 2015 Share Posted July 16, 2015 I've been using the Unity exporter and its awesome! Makes my life a lot easier Something I'm struggling with at the moment is referring to my game objects in Babylon.js. I have some cubes in Unity which I have assigned different names to, however the exporter doesn't use those names, but uses the name of the base mesh, which is "Cube". Unfortunately that means every single cube (as well as all primitive shapes) have the same name. Assigning a tag to them in Unity doesn't help since tags don't get exported with the object. The only way I can refer to these different cubes is by searching the resulting .babylon file to look for all the cubes and get their IDs. I have to do this every time I export since those IDs change. Does anyone know of an easier way I can refer to my different cubes, or a way I can get the exporter to use game object name instead of mesh name? Quote Link to comment Share on other sites More sharing options...
ozRocker Posted July 16, 2015 Author Share Posted July 16, 2015 I solved it! Hopefully it doesn't break other stuff, but so far it works. open file "SceneBuilder.Meshes.cs" look for function "ConvertUnityMeshToBabylon" in the first few lines look for:ExporterWindow.ReportProgress(progress, "Exporting mesh: " + mesh.name);and change to:ExporterWindow.ReportProgress(progress, "Exporting mesh: " + gameObject.name);and look for:babylonMesh.name = mesh.name;and change to:babylonMesh.name = gameObject.name; Quote Link to comment Share on other sites More sharing options...
Temechon Posted July 16, 2015 Share Posted July 16, 2015 Awesome ! Is it possible for you to make a pull request on the official repo ? It would be great Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 16, 2015 Share Posted July 16, 2015 Yes please do a PR to get credits as well on our what's new And thus become an official contribuor Quote Link to comment Share on other sites More sharing options...
ozRocker Posted July 17, 2015 Author Share Posted July 17, 2015 ok, hopefully I did everything right. I've created a pull request for my branch punkoffice. Now I'm familiar with the exporter code I will go through it often and see what else I can add or improve. I'm a massive Unity3D fan but their webGL conversion is way too bulky. It won't work on IE and no chance in hell it'll work on a mobile device. Its not suitable for a personal info 3D website at all (which is what I'm working on). That's why I switched to Babylon.js, but I thought it would be painful to have to create a whole scene by code. Having the Unity exporter is a dream come true! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 17, 2015 Share Posted July 17, 2015 I do not see your PR so far Quote Link to comment Share on other sites More sharing options...
ozRocker Posted July 17, 2015 Author Share Posted July 17, 2015 I'M IN!! Hopefully I can contribute more than just a variable change in the near future jahow and jerome 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 17, 2015 Share Posted July 17, 2015 Welcome in the family my friend! Feel free to update the what's new for 2.2 as well to have your PR credited Quote Link to comment Share on other sites More sharing options...
jerome Posted July 17, 2015 Share Posted July 17, 2015 Welcome on board(it seems I wrote this once before today on this forum ) GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.