Unity의 애니메이션 시스템을 사용하여 컨트롤 상태의 각 전환을 완벽하게 애니메이션화할 수 있습니다. 동시에 수많은 프로퍼티를 애니메이션화할 수 있으므로 애니메이션은 가장 강력한 전환 모드라 할 수 있습니다.
애니메이션 전환 모드를 사용하기 위해서는 컨트롤러 요소에 Animator 컴포넌트를 추가해야 합니다. 이 작업은 “애니메이션 자동 생성”을 클릭하면 자동으로 처리됩니다. 이렇게 하면 이미 상태가 설정된 애니메이터 컨트롤러도 생성되며, 추후 필요에 따라 저장하시면 됩니다.
새 애니메이터 컨트롤러는 곧바로 사용할 준비가 되어 있습니다. 대부분의 애니메이터 컨트롤러와 달리, 이 컨트롤러는 컨트롤러의 전환을 위한 애니메이션 역시 저장하며 원할 경우 커스터마이즈할 수 있습니다.
예를 들어 애니메이터 컨트롤러가 있는 버튼 요소를 선택하면 애니메이션 창(Window>Animation)을 열어 각 버튼의 상태에 대한 애니메이션을 편집할 수 있습니다.
애니메이션 클립 팝업 메뉴를 통해 원하는 클립을 선택할 수 있습니다. “노멀”, “강조”, “눌림”, “비활성화” 중에서 선택할 수 있습니다.
노멀 상태는 버튼 요소 자체의 값에 의해 설정되며 값을 비워둘 수도 있습니다. 노멀 상태를 제외한 모든 상태에서 가장 일반적인 설정 사항은 타임라인 시작 시점의 단일 키프레임입니다. 상태 간 전환 애니메이션은 애니메이터가 처리합니다.
예를 들어, 강조 상태에 있는 버튼 폭을 변경하려면 아래와 같이 애니메이션 클립 팝업 메뉴에서 강조 상태를 선택한 후 타임라인 시작 시점에 재생 헤드를 두면 됩니다.
재생 모드로 변경하여 강조 표시될 때 버튼이 커지는지 확인해야 합니다.
하나의 키프레임에 여러 개의 프로퍼티가 각자 파라미터를 설정할 수 있습니다.
애니메이터 컨트롤러를 공유하는 방식으로 여러 개의 버튼이 동일한 동작을 공유하도록 할 수 있습니다.
UI 애니메이션 전환 모드는 Unity 레거시 애니메이션 시스템과 호환되지 않습니다. 오직 애니메이터 컴포넌트만 사용해야 합니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.