[RuntimeInitializeOnLoadMethod] Unity 런타임 초기화 method 정의를 위한 attribute
개요 게임이 실행될때 초기화를 위한 작업이 필요하다면 `RuntimeInitializeOnLoadMethod`라는 attribute를 사용하여 설정 가능하다. 해당 어트리뷰트로 설정된 static method는 게임이 로드된 후 호출된다.(invoked) Assets폴더 하위 C# 스크립트의 static method 중 하나에 해당 attribute를 설정해서 정의 가능하다. Scene에 올라가서 동작하는게 아니기 때문에 `MonoBehaviour`와 같은 Unity클래스 외 C#클래스 어느곳에 정의해도 무방하다. 예를들면 Assets root폴더에 AppMain.cs 스크립트를 만들고 아래와 같이 설정 가능하다. using UnityEngine; internal class AppMain { [Runti..
Game/개발
2022. 10. 20. 23:16
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- VS2022
- selenium
- 환경설정
- Debug
- 싱글톤
- RuntimeInitializeOnLoadMethod
- unity
- await
- C#
- .net
- 닷넷
- async
- Python
- Custom Package
- initialize
- 유니티
- logging
- Singleton
- vscode
- github
- 비동기
- framework
- firestore
- gcp
- Scraping
- Visual Studio Code
- 코루틴
- coroutine
- git
- Addressables
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함