소스 검색

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;