2012년 3월 13일 화요일

Unity3D Korean input with EZGUI UITextField

To input Korean on UITextField, add this line when UITextField was focused or entiry point of UIManager.

Input.imeCompositionMode = IMECompositionMode.On;

Unity3D의 EZGUI에서 한글 입력이 안될 때, 위의 한 줄을 추가하면 한글 입력이 가능하다.
UITextField가 Focus 되었을 때나, 한 번만 적용하면 된다.
하지만 조합 중인 글자는 보이지 않는다.

2012년 3월 12일 월요일

Android ImageView grayscale filter

public static void setGrayScale(ImageView v){
    ColorMatrix matrix = new ColorMatrix();
    matrix.setSaturation(0); //0 means grayscale
    ColorMatrixColorFilter cf = new ColorMatrixColorFilter(matrix);
    v.setColorFilter(cf);
}

이미지에 grayscale효과 주기

2012년 3월 3일 토요일

Unity3D in 3.4 version there is a bug Texture2D to save PNG file on Android platform.

In Unity3D 3.5, this bus was fixed.

Fixes
Android
Texture2D.EncodeToPNG() / Application.CaptureScreenshot() produced broken images.

In 3.4 I used JPGEncoder instead of Texture2D.EncodeToPNG().
Original JPGEncoder with javascript is here
And with C# version are here(thread) and here(zip file)

Now, I'll try JPGEncoder with C#.

2012년 3월 1일 목요일

iOS 5 ASIHTTPRequest sent twice

If you wish to prevent your ASIHTTPRequest GET sometimes sending 2 or more server requests (due to network issues outside your control) you can simply set this flag:

request.shouldAttemptPersistentConnection = NO;

ASIHTTPRequest, request sent twice