LoadOnlyInEditor.cs 400 B

123456789101112131415161718192021222324
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class LoadOnlyInEditor : MonoBehaviour
  5. {
  6. // Start is called before the first frame update
  7. void Start()
  8. {
  9. #if UNITY_EDITOR
  10. {
  11. }
  12. #else
  13. GetComponent<Canvas>().enabled = true;
  14. #endif
  15. }
  16. // Update is called once per frame
  17. void Update()
  18. {
  19. }
  20. }