using System.Collections; using UnityEngine; public class SetCharacterPos : MonoBehaviour { //IEnumerator Start() //{ // while (IngameUIManager.Ins == null) yield return null; // Camera uiCamera = IngameUIManager.Ins.transform.parent.GetChild(0).GetComponent(); // // UI의 화면 좌표 // Vector3 screenPos = RectTransformUtility.WorldToScreenPoint(uiCamera, IngameUIManager.Ins.tf_CharacterPos.position); // // 화면 좌표 -> 월드 좌표 // Vector3 worldPos = Camera.main.ScreenToWorldPoint( // new Vector3(screenPos.x, screenPos.y, transform.position.z - Camera.main.transform.position.z) // ); // transform.position = worldPos; //} }