CanvasReset.cs 427 B

123456789101112131415161718192021222324
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class CanvasReset : MonoBehaviour {
  5. public iTweenPositionTo tip = null;
  6. private Vector3 t;
  7. private void Awake()
  8. {
  9. t = transform.position;
  10. }
  11. private void OnEnable()
  12. {
  13. tip.iTweenPlay();
  14. }
  15. private void OnDisable()
  16. {
  17. transform.position = t;
  18. }
  19. }