Объект привязан, в триггер ничо не входит
public class ShopSlot : MonoBehaviour
{
[SerializeField]
private GameObject shipPrefab;
private MoveShip moveShip;
private void OnTriggerEnter2D(Collider2D coll)
{
moveShip = coll.gameObject.GetComponent<MoveShip>();
moveShip.vector3Slot = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, gameObject.transform.position.z);
}
private void OnTriggerExit2D(Collider2D collision)
{
moveShip.vector3Slot = Vector3.zero;
Debug.Log(moveShip.vector3Slot);
}
}