Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class snapShot : MonoBehaviour {
  6.  
  7. public SkinnedMeshRenderer render;
  8. Mesh meshd;
  9.  
  10. // Use this for initialization
  11. void Start () {
  12.  
  13. render = GetComponent<SkinnedMeshRenderer> ();
  14.  
  15. }
  16.  
  17. // Update is called once per frame
  18. void Update () {
  19.  
  20. if (Input.GetKeyDown(KeyCode.Space)){
  21. render.BakeMesh (meshd);
  22.  
  23. }
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement