Browse Source

GetMeshByName

Fl0xer 8 năm trước cách đây
mục cha
commit
2bd62cc98c
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      h3d/scene/Object.hx

+ 4 - 0
h3d/scene/Object.hx

@@ -261,6 +261,10 @@ class Object implements h3d.impl.Serializable {
 		return out;
 	}
 
+	public function getMeshByName( name : String) {
+		return Std.instance(getObjectByName(name), Mesh);
+	}
+
 	public function getObjectByName( name : String ) {
 		if( this.name == name )
 			return this;