added: lock-on mechanics testing
This commit is contained in:
20
Assets/Scripts/Core/LockOnManager.cs
Normal file
20
Assets/Scripts/Core/LockOnManager.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class LockOnManager : MonoBehaviour{
|
||||
[ShowInInspector]
|
||||
public UIDocument lockOnDocument;
|
||||
[ShowInInspector, SerializeField]
|
||||
public ILockOnTarget lockOnTarget;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update(){
|
||||
Debug.Log(RuntimePanelUtils.CameraTransformWorldToPanel(lockOnDocument.rootVisualElement.panel, lockOnTarget.GetReticlePosition(), Camera.main.GetComponent<Camera>()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user