inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

한국용님의 게시글

한국용 한국용

@hankukyong4611

수강평 작성수
-
평균평점
-

게시글 1

질문&답변

Singleton 패턴 관련 문의

제 경우에는 @Managers Objects 가 없는 경우 정상적으로 null Check 를 해서 @Managers Objects 를 만들고 Managers Component 도 붙이는것 같긴한데요.. 아래와 같은 Warning이 납니다. ou are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all 강사님 답변을 찾아보니 GamesObject 는 Monobehavior 상속을 받지 않기 때문에 new 로 생성이 가능하다고 하신것 같은데, 자료에 있는 스크립트와 제가 작성한 스크립트를 찾아봐도 차이점을 도저히 모르겠습니다 ㅠㅠ;

좋아요수
0
댓글수
3
조회수
565