瀏覽代碼

Changed to use game object name instead of mesh name

When creating a game object based off a primitive object (cube,
cylinder, plane, etc...) you would end up with the name of the primitive
object (mesh name) in the resulting .babylon file.  This presented
problems when trying to refer to an object.  For example, you would have
cubes all called "Cube" instead of the actual game object name.
punkoffice 10 年之前
父節點
當前提交
3a54ee9ab3
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Exporters/Unity 5/Unity3D2Babylon/SceneBuilder.Meshes.cs

+ 2 - 2
Exporters/Unity 5/Unity3D2Babylon/SceneBuilder.Meshes.cs

@@ -39,9 +39,9 @@ namespace Unity3D2Babylon
             BabylonMesh babylonMesh = new BabylonMesh();
             var renderer = gameObject.GetComponent<Renderer>();
 
-            ExporterWindow.ReportProgress(progress, "Exporting mesh: " + mesh.name);
+            ExporterWindow.ReportProgress(progress, "Exporting mesh: " + gameObject.name);
 
-            babylonMesh.name = mesh.name;
+            babylonMesh.name = gameObject.name;
             babylonMesh.id = GetID(transform.gameObject);
             babylonMesh.receiveShadows = renderer.receiveShadows;