블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Script (91)
Extensions (14)
Effect (3)
NGUI (77)
UGUI (8)
Physics (2)
Shader (36)
Math (1)
Design Pattern (2)
Xml (1)
Tips (200)
Link (22)
World (1)
AssetBundle (25)
Mecanim (2)
Plugins (70)
Trouble Shooting (68)
Encrypt (7)
LightMap (4)
Shadow (4)
Editor (8)
Crash Report (3)
Utility (9)
UnityVS (2)
Facebook SDK (2)
iTween (3)
Font (11)
Ad (14)
Photon (2)
IAP (1)
Google (8)
Android (45)
iOS (41)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-26 06:22

[펌] UnityCoverFlow

Unity3D/UGUI / 2019. 5. 14. 17:23

UnityCoverFlow

Unity3D UI CoverFlow and other Layout options

Overview

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…

 

[출처] https://unitylist.com/p/1xt/Unity-Cover-Flow

 

Unity Cover Flow

Unity3D UI CoverFlow and other Layout options

unitylist.com

 

반응형
Posted by blueasa
, |
using UnityEngine;
 using System.Collections;
 using UnityEngine.UI; // Required when Using UI elements.
 
 public class AlphaButton : MonoBehaviour
 {
     public float AlphaThreshold = 0.1f;
 
     void Start()
     {
         this.GetComponent<Image>().alphaHitTestMinimumThreshold = AlphaThreshold;
     }
 }



[출처] https://answers.unity.com/questions/821613/unity-46-is-it-possible-for-ui-buttons-to-be-non-r.html

[참조] http://www.devkorea.co.kr/bbs/board.php?bo_table=m03_qna&wr_id=68902

반응형
Posted by blueasa
, |


[링크] http://unitytutorial.tistory.com/34

반응형
Posted by blueasa
, |


[링크] http://dongin2009.blog.me/221131218231


반응형
Posted by blueasa
, |

Unity로 안드로이드 앱을 개발하다보면 스크롤 안에 버튼이 들어갈 경우가 종종 있다.

PC에서 테스트 할 때는 마우스로 잘 눌리던 버튼이 스마트 폰에 넣어서 테스트 해보면 간혹 잘 눌리지 않는 경우가 있다. 이럴때 EventSystem 설정을 바꿔줘야하는데 다음과 같이 세팅 하면 적당하다.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
private const float inchToCm = 2.54f;
     
[SerializeField]
private EventSystem eventSystem = null;
     
[SerializeField]
private float dragThresholdCM = 0.5f;
//For drag Threshold
     
private void SetDragThreshold()
{
    if (eventSystem != null)
    {
        eventSystem.pixelDragThreshold = (int)(dragThresholdCM * Screen.dpi / inchToCm);
    }
}
  
  
void Awake()
{
    SetDragThreshold();
}



출처 : http://knightk.tistory.com/12

반응형
Posted by blueasa
, |


Force Module Active가 체크 돼 있다면 체크해제 해 주자.

(현재 Unity 5.4.x 기준)



[참조] http://blog.naver.com/dunkydonk/220256297382

반응형
Posted by blueasa
, |


[링크] http://blog.naver.com/PostList.nhn?blogId=dunkydonk&from=postList&categoryNo=18

반응형
Posted by blueasa
, |

[파일]

BitmapFontImporter.unitypackage

BitmapFontImporter설명서.pptx



안녕하세요. NHN스타피쉬 TD 최윤빈 입니다.

Unity 엔진을 이용한 게임 개발 시 기존에는 NGUI를 주로 사용하셨을텐데
4.5 버전 이상부터 uGUI 라는 Unity 내장 GUI가 새로 나오면서
uGUI로 많이 갈아타고 계신걸로 알고 있습니다.

2015년 3월부터 개발중인 게임을 NGUI -> uGUI로 포팅작업을 시작하였고
그 과정에서 기존 NGUI에서 사용하던 방식대로 Bitmap font를 사용할 수 없어서 고민하다가
구글님의 도움을 받아 기존 NGUI와 유사하게 Bitmap font를 사용할 수 있도록
Custom font를 생성해주는 스크립트를 제작하였기에 공유코자 합니다.

또한 NGUI 에서는 Bitmap font를 Atlas에 묶어서 사용할 수 있었는데
uGUI 에서는 Atlas 기능이 없기때문에 직접 multiple sprite 로 묶어서 사용해야 합니다.
저희 팀에서는 TexturePacker를 사용하고 있는데요.
Bitmap font 들 또한 기존 처럼 묶어서 사용해야하기에
이를 지원하기 위한 기능도 포함 되어 있습니다. (Draw call 은 소중하니까요..)

요컨데, BitmapFontImporter 는

  • Bitmap font 제작 툴로 만든 png, txt 파일로부터 font 및 material 파일을 생성
  • Multiple sprite 지원

다음과 같은 기능을 제공합니다. 사용법은 첨부된 파일을 참고부탁드립니다.

클릭 두세번으로 손쉽게 비트맵 폰트 만드세요~





출처 : http://meetup.toast.com/posts/40

반응형
Posted by blueasa
, |