DOTS – EntitesSample (1)
1. HelloCube_MainThreadSubscene RotationSystem.cs OnCreate()는 시스템이 생성될 때 호출됩니다. RequireForUpdate를 사용하여 시스템 업데이트를 위해 ExecuteMainThread 컴포넌트가 필요함을 선언합니다. OnUpdate()는 시스템이 업데이트될 때 호출됩니다. SystemAPI.Query<RefRW<LocalTransform>, RefRO<RotationSpeed>>를 사용하여 LocalTransform과 RotationSpeed 컴포넌트를 가진 모든 엔티티를 반복합니다. transform은 LocalTransform 컴포넌트의 읽기-쓰기 참조를 나타내고, speed는 RotationSpeed 컴포넌트의 읽기 전용 참조를 나타냅니다. transform.ValueRW를 업데이트하여 회전 속도(RadiansPerSecond)와 deltaTime을 기반으로 엔티티를 회전시킵니다. RotationSpeedAuthoring.cs Baker […]
DOTS – EntitesSample (1) 더 읽기"
