본문 바로가기

C#

Singleton Pattern

static으로 변수 선언 후 초기화

 

if( = null)일 시

instance = this

 

else일 시

Destroy(gameObject)

'C#' 카테고리의 다른 글

<T>  (0) 2022.06.15
확장메소드  (0) 2022.06.15
foreach / Collection  (0) 2022.06.14
Interface  (0) 2022.06.14
abstract  (0) 2022.06.14