Some years ago I was required to build a simple Cover Flow Layout (think, iTunes Carousel). Originally I build the project in a Windows Forms application for a client we were working with. Sometime later we then needed a similar system in a project we were doing in Unity3D.
This is just a simple recreation of that work.
Its very old, and it wasn’t originally done in GitHub so I’ve just commited the whole project in one commit.
There are some simple layouts included to demonstrate the flexibility of the system,
The classic Cover Flow layout (iTunes Album Artwork style)
A Carousel Layout (Z-Depth carousel)
A “Messy Paper” Layout - Cells shift from 1 messy pile to another
Further Features
Cell reuse is supported using a simple Cell Pool with UICollectionCells registering Prefabs as “nibs” to be reused.
Data “binding” can be expanded upon with the cell reuse.
All layouts have various settings to tweak positions, speeds, snapping, wrapping and the like. These can also be updated at runtime in the editor to see results in real time.
Demos
Here’s a few GIFs showing the layouts in action in the editor (GIFs are only at 30fps and appear to have bad artifacts in them, running in the editor is obviously at full FPS with no rendering issues).
Cover Flow Layout
Carousel Layout
Messy Paper Layout
Layouts can have multiple configurable elements, here’s an example of the Cover Flow properties being edited at runtime…
요즘 제작중인 RPG 게임 GUI 에서 영웅 생성을 위해 캐릭터를 선택하는 UI 를 커버플로우(Cover Flow)로 구성하게 되어 NGUI 를 조금 응용해서 심플하게 구성해봤습니다. 아래 동영상과 유니티 데모를 보시면 대략 어떤 것인지 아실 수 있을 것이며 혹시나 구현 방법에 대해 관심 있는 분들은 첨부 파일을 받아서 패키지 임포트로 유니티에서 가져가 내용을 살펴 보시면 되겠습니다. NGUI 외에도 트위닝 모션을 위해 HOTween 플러그인을 사용하는 코드가 있으나 수정해서 쓰셔도 되겠습니다. 그리고 데모에 보이는 캐릭터 디자인 소스는 에셋 스토어에서 구입한 것이네요. NGUI 플러그인에 이런 기능도 포함되면 좋을 것 같은데 안된다면 아쉽지만 저처럼 이렇게 구현해야 되겠지요.^^ 여러분은 지금 어떤 기능들을 추가해보고 있나요?