dontClear.cs 770 B

12345678910111213141516171819202122232425262728293031
  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. SignalingSettings ss = sm.GetSignalingSettings();
  15. Invoke("yidong",1f);
  16. }
  17. void yidong()
  18. {
  19. this.transform.position = Camera.main.transform.position;
  20. this.transform.eulerAngles = new Vector3(0, Camera.main.transform.eulerAngles.y, 0);
  21. }
  22. // Update is called once per frame
  23. void Update()
  24. {
  25. }
  26. }
  27. }