Short Cake
8PM - Animal Crossing Wild World

사생활 보호 설정

https://gamjia.tistory.com

Mini Rooms

  • 내 미니룸
  • 미니미설정
  • 미니룸설정
  • 답글수 [0]

What Friends Say

한마디로 표현해봐~

1촌평 관리

Unity, Cocos Animation Controller 비교

GamJia 2025. 1. 17. 23:12

 
오늘은 게임 개발에 빼놓을 수 없는
Animation Controller에 대해 알아보겠습니다
비슷한듯 다른 두 게임 엔진을 비교해서 설명드릴게요
 
 
 

Unity Animation Controller


 
Create > Animator Controller에서 생성 가능합니다
Parameter는 Float, Int, Bool, Trigger 입니다
https://docs.unity3d.com/kr/2021.3/Manual/class-AnimatorController.html

애니메이터 컨트롤러 - Unity 매뉴얼

애니메이터 컨트롤러를 사용하여 캐릭터나 오브젝트의 애니메이션 클립 세트와 관련 애니메이션 전환을 정렬하고 관리할 수 있습니다. 대부분의 경우, 여러 애니메이션을 이용하여 게임 내에

docs.unity3d.com

 

this.GetComponent<Animator>().SetFloat("Float", 1.0f);	
this.GetComponent<Animator>().SetInteger("Int", 1);	
this.GetComponent<Animator>().SetBool("Boolean", true);
this.GetComponent<Animator>().SetTrigger("Trigger");

 
 
Unity는 Type별 Method로 세분화 되어 있습니다
Type 안정성을 보장하며
Type 오류를 줄일 수 있다는 장점이 있습니다
 


Cocos Animation Controller


 
Create > Animation Graph에서 생성 가능합니다
Parameter는 Float, Int, Bool, Trigger, Vector 3D, Quaternion 입니다
https://docs.cocos.com/creator/3.8/manual/en/animation/marionette/animation-controller.html

 

Cocos 같은 경우에 보면 Vector3D, Quaternion이 있는데
이건 Animation Parameter로 쓰이는 값이지만
직접 Transition(상태 전환)에 사용되기보다는
Animation Clip 내에서 동적으로 위치와 회전을 조정하는 데 쓰입니다.
 

this.getComponent(animation.AnimationController).setValue('Float',1.0);		
this.getComponent(animation.AnimationController).setValue('Int',1);		
this.getComponent(animation.AnimationController).setValue('Boolean',true);	
this.getComponent(animation.AnimationController).setValue('Trigger',true);	
// Trigger도 Boolean처럼 true로 바꿔주세요

 

Cocos 같은 경우에 모든 Animation Parameter를
setValue 하나로 처리 가능합니다
Data Type을 신경 쓰지 않고 직관적으로 코드를
작성할 수 있어 간편하다는 장점이 있습니다

'Game Develop' 카테고리의 다른 글

Unity, Cocos Collider 비교  (0) 2025.01.25
Unity 6 Demo Showcase  (0) 2025.01.10
Unity 6 Challenge  (0) 2025.01.05
Unity 6 Challenge - 8  (0) 2024.12.30
Unity 6 Challenge - 7  (0) 2024.12.29