public override void Restore(Component component, RestorePostProcess post)
        {
            base.Restore(component, post);
            var meshFilter = component as MeshFilter;

            meshFilter.mesh = mesh?.Instantiate();
        }
Beispiel #2
0
        public override void Restore(Component component, RestorePostProcess post)
        {
            base.Restore(component, post);

            var renderer = component as MeshRenderer;

            renderer.additionalVertexStreams = additionalVertexStreams?.Instantiate();
        }
        public override void Restore(Component component, RestorePostProcess post)
        {
            base.Restore(component, post);

            var renderer = component as SkinnedMeshRenderer;

            renderer.quality                               = quality;
            renderer.updateWhenOffscreen                   = updateWhenOffscreen;
            renderer.sharedMesh                            = sharedMesh?.Instantiate();
            renderer.skinnedMotionVectors                  = skinnedMotionVectors;
            renderer.localBounds                           = localBounds;
            bones?.Restore(post, t => renderer.bones       = t);
            rootBone?.Restore(post, t => renderer.rootBone = t);
        }