using System; using System.Collections; using System.Collections.Generic; using System.Numerics; using Sirenix.OdinInspector; using Unity.Cinemachine; using UnityEngine; using UnityEngine.UIElements; using Vector2 = UnityEngine.Vector2; using Vector3 = UnityEngine.Vector3; public class LockOnManager : MonoBehaviour{ [ShowInInspector] public UIDocument lockOnDocument; public GameObject lockOnTarget; public CinemachineTargetGroup targetGroup; public float lockOnRange; [Space(5)] public List lockOnTargets = new List(); private Label elementLabelName; private VisualElement elementRoot; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { if (lockOnTarget.GetComponent() == null) { Debug.LogError($"Game Object {lockOnTarget.name} does not implement the ILockOnTarget interface. Not processing lock-on actions!"); } elementRoot = lockOnDocument.rootVisualElement.Query("LockOnGroup"); elementLabelName = lockOnDocument.rootVisualElement.Query