dontClear.cs 709 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using Unity.RenderStreaming;
  4. using UnityEngine;
  5. namespace touping
  6. {
  7. public class dontClear : MonoBehaviour
  8. {
  9. public SignalingManager sm;
  10. // Start is called before the first frame update
  11. void Start()
  12. {
  13. DontDestroyOnLoad(this.gameObject);
  14. Invoke("yidong",1f);
  15. }
  16. void yidong()
  17. {
  18. this.transform.position = Camera.main.transform.position;
  19. this.transform.eulerAngles = new Vector3(0, Camera.main.transform.eulerAngles.y, 0);
  20. }
  21. // Update is called once per frame
  22. void Update()
  23. {
  24. }
  25. }
  26. }