123456789101112131415161718192021222324252627282930 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class TestMenu : MonoBehaviour
- {
- public GameObject Menu;
- public Transform menuParent;
- public Vector3 startPos;
- public Vector3 startRot;
-
- private void OnEnable()
- {
-
- Menu.SetActive(true);
- Menu.transform.position = menuParent.position;
- Menu.transform.eulerAngles = new Vector3(20, menuParent.eulerAngles.y, menuParent.eulerAngles.z);
- }
- private void OnDisable()
- {
- if(Menu!=null)
- Menu.SetActive(false);
- }
- }
|