using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Room : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnTriggerEnter2D(Collider2D other)
{
if(other.tag=="Player")
{
CameraController.instance.ChangeTarget(transform);
}
}
}
이렇게 되어있는데 여기서 ChangeTarget()안에 넣은 transform은 이 오브젝트가 가지고있는
transform을 넣어준다는건가요?
그러합니다
ㅖ
gameobject나 transform은 this.가 생략되있다고 보면됨
소문자는 자기자신이랭
그거 마우스 갖다대면 누구껀지 알려줌 - dc App
맞음. 마찬가지로 소문자 gameObject도 자기자신 - dc App