2014년 9월 24일 수요일

Google Play Game Service for Unity In Android_Step2. GPGS Plugin 활용을 위한 Manager Class 생성 & 사용 in Unity

 Explain. 앞서 GPGS활용을위한 셋팅까지 완료한경우 Unity Project에서 GPGS의 기본적은 기능(업적 , 리더보드)를 활용하기위한 Class 생성. 아래 방법은 여러가지 방법중 하나이므로 프로젝트 상황에 맞게끔 구현하여 사용하면 됩니다. 1. Google Game service의 리더보드,업적의 경우 Id값을 기준으로 실행이 이뤄지므로 Developer Console의 업적,리더보드에서 Get Resources를 클릭하여 ID값을 복사 2.위 처럼 텍스트 형식으로 Export하여 복사하여 둡니다. 이후 아래처럼 GPGS Manager Class를 생성한 뒤 Scene에 배치후 이벤트 관련 동작시(게임종료) 업적,리더보드관련 메소드를 호출하여 동작을 확인해 보실수있습니다. 리더보드 , 업적 확인 관련 UI호출은 ShowLeaderBoard, ShowArchievement 메소드를...

2014년 9월 23일 화요일

Google Play Game Service for Unity In Android_Step1. GPGS Plugin 설치후 기본적인 셋팅

Notice.  - 이전의 포스팅에서의 준비사항이 모두 준비된 상태에서 진행. (준비사항)  - Developer console사용법등의 기타 방법은 자세하게 정리X 1. GPGS와 연동할 application 등록. 2.Game Service 또한 등록. 3.Game Service 등록시 출력되는 Application ID값 복사. 4.Unity 프로젝트에 Google Play Service Plugin Import후 메뉴바의 Google Play Services -> Android Setup 실행 위에서 복사해둔 ID값 입력 -> Setup 버튼 클릭 5. 이후 다시 Developer Conlose로 돌아와서 Game Service 메뉴의 업적 추가 기본적으로 최소 5개 이상으로 등록 e.g) 점수 xxx 이상 달성 플레이 횟수 x...

2014년 9월 3일 수요일

Google Play Game Service for Unity In Android_Step0. Index & 준비 사항.

Summary.  - Anroid & IOS App 작업진행시 각종 게임 관련 기능들을 제공해주는 플랫폼중  가장 널리 알려진 Google play game service를 Unity에서 활용하는 기본방법 포스팅.  - GPGS의경우 기본적은 리더보드 , 업적등의 기능 외에도 Multiplay, cloud game save 등의 기능까지 제공해주므로 여러가지 방면으로 유용한 플랫폼. Requirements.  - Unity 4.3 이상(only Pro)  - Android SDK  - Google Play Services library 4.2.42 이상 (SDK Manager에서 설치 가능)  - Google Developer 계정(테스트용으로 진행할 App 등록)  - GPGS Plugin 최신버전 - 다운로드  Index  -step 0 : 준비 사항  -step 1 : GPGS Plugin 설치후 기본적인 요구사항 셋팅  -step...

좋은 글_dum spiro spero

dum spiro spero 내가 숨쉬는동안 나는 희망한다. ...

Android_Intent 형식으로 미디어 파일 재생하기.

Explain. 친숙한 방식인 Intent형식으로 미디어파일을 재생하기. 간단한 방법이므로 따로 설명은 생략. Code. public void OpenMediaFile(String path) { Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File file = new File(path); String extension = path.substring(path.lastIndexOf(".")); if(extension.equalsIgnoreCase(".avi") || extension.equalsIgnoreCase(".mp4")) { intent.setDataAndType(Uri.fromFile(file), "video/*"); } else { intent.setDataAndType(Uri.fromFile(file), "audio/*"); } startActivity(intent);...

Android_Intent방식을 활용한 Social 기능 구현_Filter 적용하기.

Explain. 앞서, intent기능을 활용한 social기능 구현하는법을 포스팅하였습니다. 링크 이번에는 각 intent마다 필터링을 하여 각 app 마다 맞춰줘야할 템플릿을 맞춰주는것을 포스팅. Code. public void Share() { File videoFile = new File("My Video File Path"); Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("video/mp4"); shareIntent.putExtra(Intent.EXTRA_SUBJECT, "My Video"); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(videoFile)); shareIntent.putExtra(Intent.EXTRA_TEXT, "Enjoy the Video"); PackageManager pm = getPackageManager(); Intent sendIntent = new...

2014년 9월 2일 화요일

Android_Intent 방식을 활용하여 Share기능 구현.

Explain. Android Native기능중 Social관련 기능을 아주 쉽고 빠르게 구현할수있는방법. Api를 활용하는것보다 완성도적인 측면에서는 떨어짐. 예제는 video파일 공유를 예로 든것이며 따로 text, image도 intent설정만 조금 변경해주고 방식은 동일하다. Flow. 1. 공유할 정보를 담은 Intent 생성. 2.현재 휴대폰에 설치되어있는 App중 이 Intent형식을 지원하는 App 선택창 제공 3.App 선택후 공유진행. 순으로 진행되는것이 일반적이며 이때 App마다 intent설정 방식이 조금 차이가 있는(대부분 동일) app이 존재하므로 filter를 적용해주는것도 하나의방법. (추후 포스팅 하겠습니다.) Code. public void Share(){ Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_SUBJECT, "My Video"); intent.putExtra(Intent.EXTRA_STREAM,...