강의

멘토링

로드맵

Inflearn Community Q&A

jcs23491757's profile image
jcs23491757

asked

Unity Game Development (2D) Practical - From Scripts to Design Patterns and Algorithms

Coroutine #2

컬러의 알파값을 한 번에 바꿀 수 없나요?

Written on

·

155

0

강의를 듣다가 궁금해졌는데

sr = GetComponent();

위에서 이렇게 작성을 했잖아요?

sr.color.a = f;

왜 이 구문이 에러가 나는지 이유를 모르겠습니다.

굳이

Color tColor = sr.color;

tColor.a = f;

sr.color = tColor;

이런식으로 새로운 컬러를 생성해서 그 컬러의 알파값만 따로 바꾼후에

다시 원래 컴포넌트의 컬러에다가 다시 그 컬러를 대입하는 식으로 해야할까요?

unity디자인-패턴

Quiz

54% of people got it wrong. Give it a try!

유니티에서 코루틴이 필요한 주된 이유는 무엇일까요?

멀티스레딩으로 게임 성능을 높이기 위해

코드 실행을 일시 중지하고 다음 프레임에 재개하기 위해

객체의 위치를 실시간으로 추적하기 위해

애니메이션 클립을 관리하기 위해

Answer

This question is waiting for answers
Be the first to answer!
jcs23491757's profile image
jcs23491757

asked

Ask a question