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

카테고리

분류 전체보기 (2731)
Unity3D (814)
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 (68)
Trouble Shooting (68)
Encrypt (7)
LightMap (4)
Shadow (4)
Editor (8)
Crash Report (3)
Utility (9)
UnityVS (2)
Facebook SDK (2)
iTween (3)
Font (10)
Ad (14)
Photon (2)
IAP (1)
Google (8)
Android (45)
iOS (41)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (57)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (51)
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
03-29 07:22

NGUI 를 사용하면서 GUI에 가린 오브젝트들이 GUI와 같이 클릭되는 현상을 게임 제작하면 많이들 보게됩니다. 그럴때는 아래 소스에서 작동하는 녀석으로 쓰면됩니다.

 

if (UICamera.Raycast (Input.mousePosition) == true) 
{

        // NGUI 오브젝트가 선택되었음
} else

{

       // 해당 일반 오브젝트 선택되었음

}

 

or

 

if(null == UICamera.hoveredObject)

{

    // 게임쪽 클릭 처리

}

 

본인은 2번째 소스로 쓰다가 최근에 들어서 모바일에서 작동이 잘 안하는 관계로 1번을 사용하고 있습니다.



출처: https://sjcy.tistory.com/entry/NGUI와-일반-오브젝트-구분-피킹법 [Charlotte's web]

 

NGUI와 일반 오브젝트 구분 피킹법

NGUI 를 사용하면서 GUI에 가린 오브젝트들이 GUI와 같이 클릭되는 현상을 게임 제작하면 많이들 보게됩니다. 그럴때는 아래 소스에서 작동하는 녀석으로 쓰면됩니다. if (UICamera.Raycast (Input.mousePosit

sjcy.tistory.com

 

반응형
Posted by blueasa
, |

Re: UI Label line count

« Reply #5 on: July 19, 2013, 07:04:08 PM »

Just count instances of '\n' in the UILabel.processedText

 

 

[출처] www.tasharen.com/forum/index.php?topic=4509.0

 

UI Label line count

how can i get the total number of lines which will be required to show the label if it is limited with max line count. i will try and explain this more suppose i have a label which has suppose 40 lines, now to make label look small i set the Max Line var f

www.tasharen.com

 

[참조] devkorea.co.kr/bbs/board.php?bo_table=m03_qna&wr_id=42437

 

데브코리아

한국 게임개발자 커뮤니티

devkorea.co.kr

 
반응형
Posted by blueasa
, |

[링크]

https://qits.tistory.com/m/entry/NGUI-%EC%8A%A4%ED%81%AC%EB%A1%A4-%EB%8A%90%EB%A0%A4%EC%A7%80%EB%8A%94-%ED%98%84%EC%83%81-%EC%9E%AC%EC%82%AC%EC%9A%A9%EB%A6%AC%EC%8A%A4%ED%8A%B8%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EA%B3%A0-%EA%B8%B0%EB%8A%A5-%EA%B0%9C%EC%84%A0

 

NGUI 스크롤 느려지는 현상 (재사용리스트를 사용하지 않고 기능 개선)

NGUI로 스크롤 을 구현하다보면 Grid를 사용하는 것이 일반적인데, 아이템이 많아지면 느려지는것을 자주 보게 된다. 아이템이 많아지니까 느려지는것은 어찌보면 당연한 일이다. 하지만 그대로 사용할수없으니 해..

qits.tistory.com

 

반응형
Posted by blueasa
, |

[링크] https://redforce01.tistory.com/242

 

[NGUI] Infinite ScrollView (AT)

최근 회사에서 채팅UI의 구조 개선에 대한 이슈가 발생하여 만들어두었던 채팅창을 모두 갈아엎게 되었다. 기존의 채팅 UI구조는 채팅메세지가 들어올 때마다 Instantiate ( ) 가 수행되어 말풍선 UI가 계속해서..

redforce01.tistory.com

 

반응형
Posted by blueasa
, |

[수정] 2021-06-10

Height 값 참조 오류 수정(참조 값 manualHeight -> activeHeight로 변경)

 

[스크립트 파일]

UISafeAreaOffsetController.cs
0.00MB

 

아래 위치와 같이 Anchor의 하위에 GameObject를 하나 만들고,

인스펙터와 같이 Top/Bottom에 따라 만들어진 GameObeject를 Drag&Drop 해서 Link 한다.

 

 

위와 같이 셋팅해 주면 Fan이 Top쪽 Safe Area가 있으면 그에 맞게 좀 더 내려온다

(Bottom은 같은 형태로 List Offset List_Bottom에 Link 해주면 된다.)

 

대충 만들어서 넣어놔서 정리좀 하고 싶지만 다음 기회로..

필요하신 분은 받아서 써보시고 개량해서 공유 좀 해주세요~

 

 

[참조] https://blueasa.tistory.com/2272

반응형
Posted by blueasa
, |

[링크]

https://carrotclub.tistory.com/entry/NGUI-%EC%82%AC%EC%9A%A9-%ED%9D%90%EB%A5%B4%EB%8A%94-%EB%AC%B8%EC%9E%90%EC%97%B4-%EB%A7%8C%EB%93%A4%EA%B8%B0

 

NGUI 사용 흐르는 문자열 만들기

가. 흐르는 문자열 만들기 - 사용 조건 : NGUI가 있어야 함. 나. 코드 - NGUI UILabel.cs 파일내에 있는 overflow enum 값에 FlowText 라는 값을 추가해준다. 해당 옵션이 되어져 있을 경우 글자가 흐르게 할 예정..

carrotclub.tistory.com

 

반응형
Posted by blueasa
, |

NGUI에서 초당 터치 횟수 제한을 하려는데 설정 옵션이 없어서

유니티에 있는 StandaloneInputModule.cs 스크립트의 m_InputActionsPerSecond 소스를 보고 그대로 추가함.

 

private float m_fNextAction = 0f;
private float m_fInputActionsPerSecond = 6f; // 초당 최대 액션 횟수

void ComputeNextAction()
{
    m_fNextAction = Time.unscaledTime + (1f / m_fInputActionsPerSecond);
}

void OnEventClick()
{
    DoSomeAction();
}

public void OnUIEventClick()
{
    if (m_fNextAction != 0f && Time.unscaledTime < m_fNextAction)
    {
        Debug.Log("[Skip Click Event] Max Action Per Second");
        return;
    }

    OnEventClick();
    ComputeNextAction();
}

 

[참조]

https://github.com/tenpn/unity3d-ui/blob/master/UnityEngine.UI/EventSystem/InputModules/StandaloneInputModule.cs

 

tenpn/unity3d-ui

Mirror of https://bitbucket.org/Unity-Technologies/ui/ for ease of code search - tenpn/unity3d-ui

github.com

 

반응형
Posted by blueasa
, |
반응형
Posted by blueasa
, |


Unlit - Transparent Colored GrayScale.zip




NGUI의 ScrollView 안에 있는 오브젝트의 UITexture에 GrayScale을 적용하려고 아래 [참고]의 쉐이더를 썼는데


제대로 안되길래 보니 Clipping 개수에 따른 추가 쉐이더가 없어서 겸사겸사 만들어서 올려 놓음.



[참고] http://blueasa.tistory.com/1807

반응형
Posted by blueasa
, |

Show emojis in NGUI's UILabel with dynamic font


EmojiLabel.z01

EmojiLabel.zip




[출처] https://github.com/OYYMING/EmojiLabel

반응형
Posted by blueasa
, |