示例#1
0
        protected virtual PathComponentRecord getNewByOld(Transform oldTransform)
        {
            PathComponentRecord t = null;
            PathComponentRecord f = fbxMap.get(oldTransform);

            if (f != null)
            {
                t = modelMap.get(f.path);
            }
            return(t);
        }
示例#2
0
        private void bindBone(SkinnedMeshRenderer prefab, SkinnedMeshRenderer model)
        {
            PathComponentRecord fromRecord;
            PathComponentRecord toRecord;
            List <Transform>    bones = new List <Transform>();

            foreach (Transform modelChild in model.bones)
            {
                fromRecord = modelDictionary.get(modelChild);
                toRecord   = fbxDictionary.get(fromRecord.path);
                bones.Add(toRecord.go.transform);
            }


            if (bones.Count > 0)
            {
                prefab.bones = bones.ToArray();
            }

            fromRecord      = modelDictionary.get(model.rootBone);
            toRecord        = fbxDictionary.get(fromRecord.path);
            prefab.rootBone = toRecord.go.transform;
        }