Exemple #1
0
        protected override void onAwake()
        {
            avatarService = Service.Get <AvatarService>();
            Rig component = GetComponent <Rig>();
            SkinnedMeshDefinition skinnedMeshDefinition = new SkinnedMeshDefinition(UseGpuSkinning);

            skinnedMeshDefinition.RootBoneName = component.RootBone.name;
            skinnedMeshDefinition.BoneNames    = new string[component.Bones.Length];
            for (int i = 0; i < component.Bones.Length; i++)
            {
                skinnedMeshDefinition.BoneNames[i] = component.Bones[i].name;
            }
            meshDef = skinnedMeshDefinition;
            rend    = meshDef.CreateRenderer(base.gameObject);
            Model.Definition.RenderProperties.Apply(rend);
        }
 public void SetMeshDefinition(MeshDefinition def)
 {
     this.MeshDef = def;
 }