VSCode 연결

Edit → Preferences → External Tools

vscode에 관련 확장들 다운로드

Script

스크립트 창 우클 → Monobehaviour 스크립트

image.png

using UnityEngine;

public class PlayerContent : MonoBehaviour
{
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    void Start()
    {
        Debug.Log("콘솔창 테스트");
    }

    // Update is called once per frame
    void Update()
    {
        Debug.Log("콘솔창 테스트");
    }
}

스크립트 작성이 완료되면 원하는 오브젝트에 드래그 해서 인스펙터에 넣기