12345678910111213141516171819 |
- using UnityEngine;
- using System.Collections;
- [ExecuteInEditMode]
- public class NotEditable : MonoBehaviour {
- void OnEnable()
- {
- transform.hideFlags = HideFlags.HideInInspector;
- hideFlags = HideFlags.HideInInspector;
- }
- void OnDrawGizmosSelected()
- {
- transform.position = Vector3.zero;
- transform.rotation = Quaternion.identity;
- transform.localScale = Vector3.one;
- }
- }
|