123456789101112131415161718192021222324 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class TestRotObject : MonoBehaviour
- {
- public GameObject p6;
- public GameObject obj;
- public GameObject menuObj;
- private void OnEnable()
- {
- // obj.transform.eulerAngles = p6.transform.eulerAngles;
- menuObj.transform.eulerAngles = obj.transform.eulerAngles;
- }
- public void RotObject( bool state)
- {
- obj.transform.Rotate(state? Vector3.down : Vector3.up, 90);
- menuObj.transform.Rotate(state ? Vector3.down : Vector3.up, 90);
- }
- }
|