static Bone[] _PrepareSpineBones( Bone[] bones )
{
if( bones == null || bones.Length != (int)BoneLocation.Max ) {
Assert( false );
return null;
}
int spineLength = 0;
for( int i = (int)BoneLocation.Spine; i <= (int)BoneLocation.SpineU; ++i ) {
if( bones[i] != null && bones[i].transformIsAlive ) {
++spineLength;
}
}
if( spineLength == 0 ) {
return null;
}
Bone[] spineBones = new Bone[spineLength];
int index = 0;
for( int i = (int)BoneLocation.Spine; i <= (int)BoneLocation.SpineU; ++i ) {
if( bones[i] != null && bones[i].transformIsAlive ) {
spineBones[index] = bones[i];
++index;
}
}
return spineBones;
}