Jump to content

about GetComponentsInChildren api


photo

Recommended Posts

is this way to get skinmesh?

i run editor debug Length is 0 nothing in the child.

and why meshskinned load  cant load guid?? what is this ,how to check my character is right?

image.thumb.png.32dbacdf0147baa10f95f86404c24ea0.png

image.png.5b279718b1f9cc396e20535c623e3da8.pngimage.thumb.png.cc789ca524f7c83fb216da7e11f9ce89.png

Link to comment

Hi xiaoChen,

ObjectMeshSkinned is not a component. It's a node. You can't find all nodes of type "ObjectMeshSkinned" this way.
Use something like this:

var anim = new List<ObjectMeshSkinned>();
var nodes = new List<Node>();
node.GetHierarchy(nodes);
for (int i = 0; i < nodes.Count; i++)
{
	if (nodes[i].Type == Node.TYPE.OBJECT_MESH_SKINNED)
		anim.Add(nodes[i] as ObjectMeshSkinned);
}

Best regards,
Alexander

  • Like 1
Link to comment
×
×
  • Create New...