Start()
메서드와 Update()
메서드 모두에서 메서드가 호출되지 않는데 OnDrawGizmos()
메서드가 실행되는 이유를 이해할 수 없지만 Unity 프로젝트를 실행할 때 실행됩니다. 그것이 documentation에 따라, MonoBehaviour를 구현하는 클래스에 유니티라고 때문에Unity에서 코드에서 호출하지 않을 때 내 메서드가 호출되는 이유는 무엇입니까?
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public Transform grounder;
// Use this for initialization
void Start() {
}
// Update is called once per frame
void Update() {
}
void OnDrawGizmos(){
Gizmos.color = Color.white;
Gizmos.DrawSphere (grounder.position, 1);
}
}
알겠습니다. 형제 님 감사합니다! –