using System.Collections; using System.Collections.Generic; using UnityEngine; public class AngleTest : MonoBehaviour { public bool checkPos; [PropertyActive("checkPos", true, CompareType.NotEqul)] public Transform transformA; public Transform transformB; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { Debug.Log(Vector3.SqrMagnitude(transformA.position-transformB.position)); Debug.Log(Mathf.Sqrt((transformA.position - transformB.position).sqrMagnitude)); } } }