so (1) 썸네일형 리스트형 23.11.14 ScriptableObject : 플레이어 위치 찾기 몬스터가 플레이어를 추적하는 기능을 만들 때 플레이어의 위치를 찾기위해서 Find 메소드를 사용하거나 GameManager같은 매니저가 플레이어를 미리 참조하고 있고 그걸 받아올 수 있지만, ScriptableObject를 사용하여 위치를 찾을수 있다. PlayerPosition.cs 플레이어의 위치를 필드로 가지는 ScriptableObject이다. using UnityEngine; [CreateAssetMenu(fmenuName = "PlayerPosition")] public class PlayerPosition : ScriptableObject { public Vector3 position { get; set; } } Player.cs 플레이어.. 이전 1 다음