Example #1
0
        public YAMLNode ExportYAML(IAssetsExporter exporter)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = new YAMLMappingNode();
            node.AddSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("m_AvatarSkeleton", AvatarSkeleton.ExportYAML(exporter));
            node.Add("m_AvatarSkeletonPose", AvatarSkeletonPose.ExportYAML(exporter));
            node.Add("m_DefaultPose", DefaultPose.ExportYAML(exporter));
            node.Add("m_SkeletonNameIDArray", IsReadDefaultPose(exporter.Version) ? SkeletonNameIDArray.ExportYAML(true) : YAMLSequenceNode.Empty);
            node.Add("m_Human", Human.ExportYAML(exporter));
            node.Add("m_HumanSkeletonIndexArray", HumanSkeletonIndexArray.ExportYAML(true));
            node.Add("m_HumanSkeletonReverseIndexArray", IsReadHumanSkeletonReverseIndexArray(exporter.Version) ? HumanSkeletonReverseIndexArray.ExportYAML(true) : YAMLSequenceNode.Empty);
            node.Add("m_RootMotionBoneIndex", RootMotionBoneIndex);
            node.Add("m_RootMotionBoneX", RootMotionBoneX.ExportYAML(exporter));
            node.Add("m_RootMotionSkeleton", RootMotionSkeleton.ExportYAML(exporter));
            node.Add("m_RootMotionSkeletonPose", RootMotionSkeletonPose.ExportYAML(exporter));
            node.Add("m_RootMotionSkeletonIndexArray", IsReadRootMotionSkeleton(exporter.Version) ? RootMotionSkeletonIndexArray.ExportYAML(true) : YAMLSequenceNode.Empty);
            return(node);
        }
Example #2
0
        public YAMLNode ExportYAML()
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(SerializedVersion);
            node.Add("m_AvatarSkeleton", AvatarSkeleton.ExportYAML());
            node.Add("m_AvatarSkeletonPose", AvatarSkeletonPose.ExportYAML());
            node.Add("m_DefaultPose", DefaultPose.ExportYAML());
            node.Add("m_SkeletonNameIDArray", SkeletonNameIDArray.ExportYAML(true));
            node.Add("m_Human", Human.ExportYAML());
            node.Add("m_HumanSkeletonIndexArray", HumanSkeletonIndexArray.ExportYAML(true));
            node.Add("m_HumanSkeletonReverseIndexArray", HumanSkeletonReverseIndexArray.ExportYAML(true));
#warning other values crash Unity. Why?
            node.Add("m_RootMotionBoneIndex", -1 /*RootMotionBoneIndex*/);
            node.Add("m_RootMotionBoneX", RootMotionBoneX.ExportYAML());
            node.Add("m_RootMotionSkeleton", RootMotionSkeleton.ExportYAML());
            node.Add("m_RootMotionSkeletonPose", RootMotionSkeletonPose.ExportYAML());
            node.Add("m_RootMotionSkeletonIndexArray", RootMotionSkeletonIndexArray.ExportYAML(true));
            return(node);
        }