Explain.
IOS ์์ Screen Captureํ ์ด๋ฏธ์ง๋ฅผ Social.framework๋ฅผ ํ์ฉํ์ฌ ๊ณต์ ํ๋ ๋ฐฉ๋ฒ์ ๋ฆฌ.
Sequence.
1. Application.CaptureScreenShot() ์ผ๋ก ์บก์ณ์งํ.
2. ์์ ์ด๋ฏธ์ง๋ฅผ ๊ฐ์ง๊ณ IOS์ social.framwork๋ฅผ ํ์ฉํ์ฌ ์์ด์งํ.
In Xcode
์๋ 2ํ์ผ[SocialHelper.h , mm]์ ํ์ฌ ํ๋ก์ ํธ์ Plugin/IOS ์์น ์ํจ๋ค.
SocialHelper.h
#import <Foundation/Foundation.h>
@interface SocialHelper : NSObject
{
}
+(void)ImageToTwitter:(NSString*)filePath;
+(void)ImageToFaceBook:(NSString*)filePath;
@end
SocialHelper.mm
#import "SocialHelper.h"
#import <Social/Social.h>
#import <UIKit/UIKit.h>
#import...
2014๋ 11์ 6์ผ ๋ชฉ์์ผ
2014๋ 10์ 31์ผ ๊ธ์์ผ
Posted by ColaLib on ์ค์ 4:28 with 2 comments
Explan.
IOS์์ Application.CaptureScreenShot(path) ๋ฉ์๋๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ
์บก์ฒ๋ ์งํ๋๋ ํด๋น app ์ documentํด๋๋ก ๋ค์ด๊ฐ์ ์นด๋ฉ๋ผ ๋กค์์ ํ์ธํ ์๊ฐ ์๋ค.
์ด๋ฅผ ๋ฑ๋กํด์ฃผ๋ ๋ฐฉ๋ฒ ํฌ์คํ
.
CaptureHelper.h
#import <Foundation/Foundation.h>
@interface CaptureHelper : NSObject
+(CaptureHelper *)sharedInstancs;
@end
CaptureHelper.mm
#import "CaptureHelper.h"
static CaptureHelper * captureHelper = [CaptureHelper sharedInstancs];
@implementation CaptureHelper : NSObject
+ (void)initialize{
if(captureHelper == nil)
captureHelper = [[CaptureHelper alloc] init];
}
+ (CaptureHelper...
2014๋ 10์ 1์ผ ์์์ผ
Posted by ColaLib on ์คํ 11:45 with No comments
Explain.
Visual Studio๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ snippetํ์ผ์ ์ง์ ๋ง๋ค์ด์ ์ ์ฉ.
Snippet์ ์ ์ฉํ์ฌ ์์
ํ๋ ์ด์ ๋ ๋ชจ๋ ์คํฌ๋ฆฝํธ์ ์ ์ฒด์ ์ผ๋ก ํต์ผ๋ ๋์์ธ์ ์ ์ฉํ๊ณ ๋ฐ๋ณต๋์ด์ง๋ ์์
์ ์ต์ํ ์์ผ์ค.
How to use.
์๋์ฒ๋ผ xmlํ์์ผ๋ก snippet ํ์ผ์ ์์ฑํ ์ ์ฅ(*.snippet)์ผ๋ก ์ ์ฅ ํ์ฌ์ผ ํ๋ค.
(์๋ ํ์์ ์ ๊ฐ ์ฌ์ฉํ๋(unity)์์ ํ์์ด๊ณ ๋ด์ฉ์ ํ์ํ๋๋ก ํธ์งํ์ฌ ์ฌ์ฉํ์๋ฉด๋ฉ๋๋ค.)
์ ์ฅ๊ฒฝ๋ก : Users\User\Documents\Visual Studio XXXX\Code Snippets\Visual C#\My Code Snippets
๊ทธ ์ดํ
ํ๋ก์ ํธ์์ ์ฐํด๋ฆญ-> Insert Code Snippet -> My Code Snippet -> ํด๋น Snippet ์ ํ
ํด์ฃผ์๋ฉด snippet์ด ์ง ํ๊ณ ๋ํ๋๋๊ฒ์ ๋ณด์ค์ ์์ต๋๋ค.
ctrl + K + X๊ฐ Hotkey์ด๋ ์ ์ฉํ์๋ฉด ๋ ๋ฏํฉ๋๋ค. -End.
<?xml version="1.0" encoding="utf-8"...
2014๋ 9์ 24์ผ ์์์ผ
Posted by ColaLib on ์ค์ 12:15 with No comments

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์ผ ํ์์ผ
Posted by ColaLib on ์ค์ 3:04 with No comments

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์ผ ์์์ผ
Posted by ColaLib on ์คํ 11:50 with No comments
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...
Posted by ColaLib on ์ค์ 3:16 with No comments
dum spiro spero
๋ด๊ฐ ์จ์ฌ๋๋์ ๋๋ ํฌ๋งํ๋ค.
...
Posted by ColaLib on ์ค์ 2:14 with No comments
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);...
Posted by ColaLib on ์ค์ 1:10 with No comments
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์ผ ํ์์ผ
Posted by ColaLib on ์คํ 11:43 with No comments
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,...
2014๋ 7์ 9์ผ ์์์ผ
Posted by ColaLib on ์ค์ 2:13 with No comments
Explain.
์์ฃผ์๋ ์ผ์ ์๋์ง๋ง, ์ข
์ข
System.Array type์ ๊ฐ, ์ฆ C#์์ ๋ฐฐ์ด๋ก ์ ์ธํ ๊ฐ๋ค์ ์ฌ์ฉํ ๋
orgArr[์๋ณธ]
destArr[๋ณต์ฌ๋ณธ]
์ฆ Array ์ ๋ํ Reference๊ฐ ์๋ Copy๊ฐ ํ์ํ๊ฒฝ์ฐ
๋ฌด์์์ค์ destArr = orgArr;
์ด๋ฐ์์ผ๋ก ์ฝ๋ฉํ๊ณ ๋์ด๊ฐ๋๊ฒฝ์ฐ(์ฆ, ์์ง ์ ์ฒ๋ผ ์ค๋ ฅ์ด ๋ถ์กฑํ๊ฒฝ์ฐ๊ฒ ์ง๋ง..)
๊ฐ ๋ฐ์ํ ์๋ ์์ง๋ง ์ด๊ฒฝ์ฐ destArr๊ฐ orgArr์ data๋ฅผ Copyํ๊ฒ์ด์๋
reference(์ฐธ์กฐ)ํ๊ณ ์๋๊ฒ์ด๋ฏ๋ก
orgArr์ ๋ฐ์ดํฐ๊ฐ ๋ณํ๊ฐ ์๊ธฐ๋ฉด ์๋์ผ๋ก destArr์๊ฐ๋ํ ๋ณํ๊ฐ ์๊ธด๋ค.
์ด๋ฌํํน์ง์ C#์ System.Array type(int [] , string[] , float [] ๋ฑ๋ฑ)
์ผ๋ก ์ ์ธ๋ ๋ฐ์ดํฐ๋ ๋ชจ๋ referenceํ์์ผ๋ก ์ ์ธ๋๋์ ๋๋ฌธ์ ์ผ์ด๋๋ ํ์์ด๋ค.
์ด๋ด๋ copy๊ฐ ํ์ํ๊ฒฝ์ฐ
System.Array.Copy ๋ฉ์๋๋ฅผ ์ฌ์ฉํด์ array์์ฒด๋ฅผ ๋ณต์ฌํด์ฃผ๋๊ฒ์ผ๋ก ํด๊ฒฐํ๋ฉด๋๋ค.
์์ธํ๋ด์ฉ์ MSDN์ ์๋ช
์๋์ด์๋ค. ๋งํฌ
Code.
System.Array.Copy(orgArray,...
2014๋ 7์ 8์ผ ํ์์ผ
Posted by ColaLib on ์ค์ 12:40 with No comments
Explain.
Everyplay์ฌ์ฉ์ share๊ธฐ๋ฅ์ ํนํ๋ ํ๋ฌ๊ทธ์ธ์ด๊ธฐ ๋๋ฌธ์
์์ฒด ๋๋ฐ์ด์ค์ ์ ์ฅํ๋๊ฒ์ด ๋ถ๊ฐ๋ฅ ํ๊ฒ์ผ๋ก ๋ณด์ฌ์ง.
ํ์ง๋ง, Everyplay๋ฅผ ํ์ฉํ์ฌ record์งํ์
.everyplaycache ๋ผ๋ ํด๋์
mp4ํ์ผ์ ์์ฑํ๋๊ฒ์ ํ์ธ.
์ดํ์ผ์ ํ์ฉํ ์๋ฅผ ์ ๋ฆฌ.
(.xxxx๋ฑ์ผ๋ก .์ผ๋ก ์์ํ๋ ํด๋์๊ฒฝ์ฐ ๋๋ถ๋ถ ์บ์๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๋์ฉ๋๋ก ์ฌ์ฉ.
๊ทธ๋ก์ธํด ์ผ๋ฐ์ ์ธ ๋ฐฉ๋ฒ์ผ๋ก๋ ์ ๊ทผ๋ถ๊ฐ.)
Flow.
Every play๋ฅผ ํ์ฉํ์ฌ record์งํ
โ
cacheํด๋๋ด์ .mp4ํ์ผ ์์ฑ
โ
์์ฑ๋ .mp4ํ์ผ ์ํ๋ ์์น๋ก ๋ณต์ ํ ์ฌ์ฉ.
How to used.
์๋์ ์ฝ๋๋ฅผ native jar plugin์ผ๋ก ๋ง๋ค์ด์
ํ์ฌ Unityproject์ ํตํฉํ
Everyplay stoprecord ํธ์ถ ๋ค
CopyFileFromEveryPlay๋ฅผ ํธ์ถํด์ ์ฌ์ฉ.
code.
package com.mycompany.test;
import java.io.File;
import java.io.FileInputStream;
import...
Posted by ColaLib on ์ค์ 12:09 with No comments
์ฝ์งing...
Everyplay๋ฅผ ํ์ฉํ์ฌ ์์
์
NGUI๋ฅผ ์ฌ์ฉํ๊ณ ์๋๊ฒฝ์ฐ
NGUI์ ์ผ๋ถ๋ถ๋ง ์ง์ฐ๊ณ ์ถ์ด์ ๊ทธ๋ถ๋ถ์ ํด๋นํ๋ Camera์
Everyplay HUD camera์ค์ ์ ์ ์ฉ์
NGUI๋ชจ๋ record๊ฐ ์๋๋ ํ์์ด๋ฐ์.
์ด๋ด๊ฒฝ์ฐ
recordํ UI์๋ง record์ฉ์ผ๋ก camera๋ฅผ ๋ฐ๋ก ๋ฐฐ์นํด์ฃผ์ด์ผ
record๊ฐ ์ ๋๋ก ๋์ํ๋๊ฒ์ ํ์ธ.
NGUI๋ฅผ ์ฌ์ฉ์ Everyplay๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ฉด ๋ฐ์ํ๋ ๋ฌธ์ ๋ก ๋ณด์ด๋ฉฐ
Unity์์ฒด์ UI system์ ์ฌ์ฉํ ๋๋ ๋ฐ์ํ์ง ์๋๊ฒ์ผ๋ก ํ์
๋จ....
2014๋ 6์ 17์ผ ํ์์ผ
Posted by ColaLib on ์ค์ 2:38 with No comments
Explain.
C#์ ๊ธฐ๋ฅ์คํ๋์ธ ์ ์ฒ๋ฆฌ๊ธฐ๋ฅผ ํ์ฉํ์ฌ Debug๋ชจ๋์์๋ง
Log๋ฅผ ์ถ๋ ฅํ๊ฒ๋ ๊ตฌํํด์ฃผ๋ ๋ฐฉ์.
๋ฆด๋ฆฌ์ฆ์ ์ ์ฒ๋ฆฌ๊ธฐ์ ํด์ ๋ก log๊ธฐ๋ฅ์ ๋์์๋ค.
๊ตฌํ๋ฐฉ์์ ๋งค์ฐ ๊ฐ๋จ.
Logger.cs
#define DEBUG
//#undef DEBUG // realease version
public class Logger {
public static void Log(string msg)
{
#if DEBUG
UnityEngine.Debug.Log(msg);
#endif
}
public static void ErrorLog(string msg)
{
#if DEBUG
UnityEngine.Debug.LogError(msg);
#endif
}
...
2014๋ 5์ 30์ผ ๊ธ์์ผ
Posted by ColaLib on ์ค์ 3:06 with No comments
Explain.
Unity 2D Sprite Renderer
+
2D Physics
+
Animator
๋ฅผ ํ์ฉํ์ฌ ์ค๋ธ์ ํธ๋ฅผ ์ ์์ ์ฌ์ฉ.
AutoDepth, ColorFade ๊ธฐ๋ฅ๊ตฌํ
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(BoxCollider2D))]
[RequireComponent(typeof(SpriteRenderer))]
[RequireComponent(typeof(Animator))]
[RequireComponent(typeof(Rigidbody2D))]
public class MyObject : MonoBehaviour
{
private SpriteRenderer mSpriteRenderer;
private BoxCollider2D mBoxCollider2D;
private Animator mAnimator;
private Transform mTransform;
public void FadeOut()
{
...
2014๋ 5์ 15์ผ ๋ชฉ์์ผ
Posted by ColaLib on ์ค์ 4:05 with 2 comments
Explan.
NGUI์ด์ฉ์
Script์์์ UIPannel ์ alpha scale์ ์กฐ์ ํ๋ฉด์
ํ์ด๋ ์ธ,์์ ํจ๊ณผ๋ฅผ ์ฃผ๋ ์คํฌ๋ฆฝํธ.
Tween Alpha๋ฅผ ํ์ฉํ์ฌ ์ค์๋ ์์ผ๋
๊ฐ์ธ์ ์ผ๋ก ์ง์ ์ฝ๋ฉํ์ฌ ์งํํ๋๊ฒ์ด ๋ํธํ๊ธฐ์...
UIPannel๋ฟ๋ง์๋๋ผ ๊ทธ์ธ์ ์ปดํฌ๋ํธ๋ผ๋
Alpha ์์ฑ์ด ๊ตฌํ๋์ด์๋ ๋์ด๋ผ๋ฉด
๋์ผํ๊ฒ ์ด์ฉํ ์์๋ค.
Timescale๊ฐ์ ์ํ๋๊ฐ์ผ๋ก ์์ ํ๋ฉด๋๋ค.
FadeInOut.cs
using UnityEngine;
using System.Collections;
public class PannelFadeInOut : MonoBehaviour {
private UIPanel mPannel;
private float mFadeTime = 1f;
private float mWaitTime = 1f;
private bool on = false;
void Start()
{
mPannel = GetComponent<UIPanel>();
...
2014๋ 5์ 13์ผ ํ์์ผ
Posted by ColaLib on ์ค์ 2:52 with No comments

Explanation.
NGUI๋ฅผ ์ฌ์ฉํ์ฌ ๊ฒ์์ ์์
์๋์ผ๋ก Depth๋ฅผ ์กฐ์ ํด์ฃผ๋ ์คํฌ๋ฆฝํธ
depth์ ๋ฒ์๋ฅผ ์ง์ ์ํ๊ณ ๊ทธ๋ฅ
ํฌ์ง์
์ y๊ฐ์ ๊ฐ์ง๊ณ ์์ depth๋ก ์ ์ฉ.
Todo.
์ ํด์ง depth ๋ฒ์๋ด์์ ์ ์ฉ๋๋๋ก ๋ณ๊ฒฝ.
๊ธฐ๋ณธ
Auto Depth ์ ์ฉ์
Auto Depth ์ ์ฉํ
using UnityEngine;
using System.Collections;
public class AutoDepth : MonoBehaviour {
private UISprite mSprite;
private Transform mTransform;
private int waitFrameCount = 15;
void Start () {
mSprite = GetComponent();
mTransform...
Posted by ColaLib on ์ค์ 2:37 with No comments
Explanation.
NGUI๋ก ๊ฒ์์ ์์
UI Root
โCamera
โPannel
โ2d Object(Sprite)
์ ๊ตฌ์กฐ๋ก ๊ฒ์์ ์์ ์งํํ ๋ ์ฌ์ฉํ๋ Movement
์ ๋ชฉ์ฒ๋ผ ํ๋ฉดํด๋ฆญ์ ๋ชฉํ์ขํ๋ฅผ ๊ณ์ฐ(NGUI์ ๋ง๊ฒ)ํ๋ค
์์ง์ด๋ ๋ฐฉ๋ฒ.(Click to Move)
Movement2D.cs
using UnityEngine;
using System.Collections;
//click to move with NGUI
public class Movement2D : MonoBehaviour {
private int mUIWidth = 720; // UI Root width size
private int mUIHeight = 1280; // UI Root height size
private int mScreenWidth = Screen.width;
private int mScreenHeight = Screen.height;
...
2014๋ 5์ 1์ผ ๋ชฉ์์ผ
Posted by ColaLib on ์ค์ 1:50 with 2 comments
Explanation.
ํ์ฌ ๊ฒ์ ํ๋ฉด ์บก์ณ๊ธฐ๋ฅ.
ํ์ฌ ์คํฌ๋ฆฐ ๊ทธ๋๋ก๋ฅผ readpixelํ๋ ๋ฐฉ์์ด๋ผ
OnGUI๋ก ๊ทธ๋ ค์ง๋ UI๋ ์บก์ณX
์คํฌ๋ฆฐ ์ฌ์ด์ฆ ๊ทธ๋๋ก RGB24 ํฌ๋ฉง์ผ๋ก ์ ์ฅ.
ScreenCapture.cs
using UnityEngine;
using System.Collections;
using System.IO;
public class ScreenCapture : MonoBehaviour
{
int height = Screen.height;
int width = Screen.width;
Texture2D captureTexture;
float startTime;
string saveDir = "ScreenShot"; // ์ ์ฅ ํด๋ ์ด๋ฆ.
bool draw = false;
void OnGUI()
{
if (GUI.Button(new Rect(10, 50, 100, 50), "Capture"))
{
StartCoroutine(screenCapture());
...
Posted by ColaLib on ์ค์ 1:22 with No comments

Explanation.
์ด์ ์ ํ๋ก์ ํธ์์ ์ฌ์ฉํ๋ Effect Manager ์ ์ฅ์ฉ
Effect ์ ์ฉ ์นด๋ฉ๋ผ ์์ฑํ
์นด๋ฉ๋ผ ๋ด๋ถ์ Effect Manager Script Add
์นด๋ฉ๋ผ๊ธฐ์ค ์ดํํธ ์คํฐ ์์น์ local position๊ฐ์ ๊ธฐ์ค์ผ๋ก
์ดํํธ ์์ฑ.
TODO.
Wolrd position๊ฐ์ ๊ธฐ์ค์ผ๋ก effect์์ฑ?
PlayType๋ณ๋ก effect play
EffectManager.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class EffectManager : MonoBehaviour
{
#region Singleton
private static EffectManager sInstance;
...
Posted by ColaLib on ์ค์ 12:41 with No comments

Explanation.
ํ์ฌ ํ๋ฉด์ captureํ๋ค mosaic์ฒ๋ฆฌ.
์ ๊น ์๊ฐ์ด๋์ ๊ตฌํ.
์ต์ ํ X(๊ฐ์ ํ์)
๋ชจ์์ดํฌ ์ฒ๋ฆฌ๋ฐฉ์ ๋งค์ฐ ๋นํจ์จ์ .(๊ฐ์ ํ์)
์ด๋ ์ฐ์ผ์ง๋ ์๋ฌธ.
์ ๋ฆฌํด๋๊ณ ์ถํ ํ์์ ์ฌ์ฉ.
CaptureAndMosaic.cs
using UnityEngine;
using System.Collections;
public class CaptureAndMosaic : MonoBehaviour
{
int height = Screen.height;
int width = Screen.width;
Texture2D captureTexture;
float startTime;
bool draw = false;
void Start()
{
startTime = Time.realtimeSinceStartup;
...
2014๋ 4์ 24์ผ ๋ชฉ์์ผ
Posted by ColaLib on ์คํ 11:38 with No comments

์ด์ ํฌ์คํ
์์ Jarํ์ผ์์ฑํ
Fat Jar Exporter๋ฅผ ํ์ฉํ์ฌ Jarํ์ผ์ ์์ฑํ๋๊ฒ
๊น์ง ์งํ ํ์ต๋๋ค.
๋งํฌ
1. Plugins/Android ํด๋ ์์ฑํ
AdamPlugin.jar, AndroidManifestํ์ผ ์์ฑ
2.AndroidManifest.xmlํ์ผ ๋ด์ฉ
-Unity\Editor\Data\PlaybackEngines\androidplayer
์์๋ณด์๋ฉด ๊ธฐ๋ณธ AndroidManifestํ์ผ์ด
์กด์ฌํ๋ ๊ฐ์ง๊ณ ์ค์
์ ์์ฒ๋ผ ์์ .
(Permission๋ถ๋ถ๋ํ ๋์ผํ๊ฒ ์ถ๊ฐํ์
์ผ๋ฉ๋๋ค.)
3. ์ฌ๊ธฐ๊น์ง ์๋ฃํ์
จ์ผ๋ฉด Scene
์์ฑํ Build & Run ํด๋ณด์๋ฉด
ํ๋จ์ Banner๊ฐ ๋จ์๋๊ฒ์ ํ์ธํ์ค์์์ต๋๋ค.
4. Interstitial Ad(์ ๋ฉดํ ๊ด๊ณ ) ๊ด๋ จ ์คํฌ๋ฆฝํธ
๋งํฌ
5.IOS์์
๋ํ
Document์ฐธ๊ณ ํ์
์...
Posted by ColaLib on ์คํ 11:35 with No comments
Adam.cs
public class Adam : MonoBehaviour {
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity;
#region Singleton
private static Adam sInstance;
public static Adam GetInstance
{
get
{
if (sInstance == null) sInstance = (Adam)FindObjectOfType(typeof(Adam));
if (sInstance == null)
{
if (GameObject.Find("Singleton"))
{
GameObject goInst = GameObject.Find("Singleton");
...
Posted by ColaLib on ์คํ 8:24 with No comments
package com.my.app;
import net.daum.adam.publisher.AdInterstitial;
import net.daum.adam.publisher.AdView;
import net.daum.adam.publisher.impl.AdError;
import android.app.NativeActivity;
import android.content.res.Configuration;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.RelativeLayout;
import com.unity3d.player.UnityPlayer;
public class UnityPlayerNativeActivity...
Posted by ColaLib on ์ค์ 3:53 with No comments

Summary
๊ธฐ์กด์ ๋ชจ๋ฐ์ผ ๊ด๊ณ ์ง์ ์๋ฃจ์
์ด ๋ง์ง๋ง ํ๊ตญ์ ์ ๋ฅผ ํ๊ฒ์ผ๋กํ ๊ฒ์์ด๋ฉด
์์ต๋ฅ ์ด ์ด๋์ ๋ ๋ณด์ฅ์ด๋๋ Ad@m SDK + Unity ํตํฉ์์
๊ด๋ จ ํฌ์คํ
.
์ ๋ Unity 4.3.3f pro + Eclipse๋ก ์์
์งํ.
UnityNativeActivity๋ฅผ ์์ ํ์ฌ Ad๋ฅผ ๋ถ์ด๋ ๋ฐฉ๋ฒ์ผ๋ก ์งํ.
์ด 2ํธ์ผ๋ก ์งํํ๊ฒ ์ต๋๋ค.
Requirements.
Unity Pro License
Ad@m Android SDK - Ad@m HomePage
Eclipse Fat Jar Exporter Plugin - Fat Jar Homepage
Ad@m ์ฌ์ดํธ,์ฑ๊ด๋ฆฌ ์์ ์ฑ๋ฑ๋ก.
Process.
1. Empty Android Project ์์ฑ
- pakage Name์ Unity์ pakage๋ช
๊ณผ ๋์ผํ๊ฒ.
2....
Posted by ColaLib on ์ค์ 12:16 with No comments
Summary.
๊ธฐ์กด์ Object Pooling์ ์ฌ์ฉํ๊ธฐ์ํด ์ฌ์ฉํ๋๊ฒ์ Generic Classํ ํ์ฌ ๋ดค์ต๋๋ค.
์ฝ๋์ ๋ฌธ์ ๊ฐ ๊ตฐ๋ฐ๊ตฐ๋ฐ ๋ณด์ด์ง๋ง ์ดํ ์กฐ๊ธ์ฉ ๋ณด์ํด ๋๊ฐ๊ฒ ์ต๋๋ค.
Pool.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Pool<T> : MonoBehaviour where T : MonoBehaviour {
public GameObject _PoolObject;
public int _PoolLength;
private int mPoolLength;
private List<T> mPoolList;
private int? mIndex = null;
void Awake()
{
Initialize(_PoolLength);
}
private void Initialize(int length)
{
mPoolLength...
2014๋ 4์ 23์ผ ์์์ผ
Posted by ColaLib on ์คํ 11:22 with No comments

Intro.
์ค๋๋ง์ ํฌ์คํ
์
๋๋ค.
Unity 4.3.x ๋ฒ์ ์ดํ ํฌ๊ฒ ๋ฌ๋ผ์ง ์์
ํ๊ฒฝ(Unity2D ์ง์)
NGUI , Facebook , GPGS ๋ฑ Plugin์ ์
๋ฐ์ดํธ..
๋ฑ์ ์ด์ ๋ก ์ด๋ฐ์ ๋ฐ ์์
ํ๊ฒฝ ์
ํ
,ํ
์คํธ๋ก ์ด์ ์ ํฌ์คํ
(Facebook)๊ด๋ จ
๋ํ ์ดํ ์ ๋ฆฌํ์ฌ ์๋ก ์ฒ์๋ถํฐ(๋ด๋๊ฒ์ด ๋๋ฌด๋ง์์..)ํฌ์คํ
ํ๊ฒ ์ต๋๋ค.
Purpose.
Unity 2D ํ๊ฒฝ์์ ์์
์
์ด๋ฏธ์ง ์ฌ์ด์ฆ(Pixel)๊ณผ Camera์์์ ์ด๋ฏธ์ง์ฌ์ด์ฆ(Unit)๋ฅผ ์ผ์น ์ํด.
e.g.
๊ธฐ๋ณธ์ ์ผ๋ก Unity Sprite์์ฑ์
Pixel to Unit ์ ๊ฐ์ 100์
๋๋ค.
์ด๋ฅผ๊ธฐ์ค์ผ๋ก ์งํํ๊ฒ ์ต๋๋ค.
ํ๋ฉดํด์๋๋ฅผ 720 * 1280(9 : 16)๋ฅผ ๊ธฐ์ค์ผ๋ก ์ก๊ณ
์์
ํ ์ด๋ฏธ์ง๋ฅผ Unity๋ด์์...
2014๋ 1์ 27์ผ ์์์ผ
Posted by ColaLib on ์ค์ 3:04 with No comments
1. Unity ์ฉ Facebook SDK๋ฅผ ๋ค์ด๋ก๋ํ๋ค[์ ๋ 4.3.3๋ฒ์ ์ ์ฌ์ฉ]
- ํจํค์ง ๋ค์ด๋ก๋
2. Facebook SDK import
3. ์ด์ ์ ์์ฑํด๋ facebook App ๋์ฌ๋ณด๋์์
์ฑ ID๋ฅผ ๋ณต์ฌํด ๋๋ค. Ctrl + C
4. Facebook -> Edit Setting
5. App Name์ ์ฌ์ฉํ ์ด๋ฆ์ ์ ๊ณ
App ID์ ์์ ๋ณต์ฌํด๋ ID ์
๋ ฅ Ctrl + V
6. ๊ทธ์ดํ Android build Facebook Setting ๋ฉ๋ด๊ฐ ์ ๋๋ก ๋์ค๋์ง ํ์ธ
์ด๋ Openssl ๋ฏธ ์ค์น์ KeyHash๊ฐ ์ถ๋ ฅ๋์ง ์๋๋ค.
Openssl ์ค์น ํ ์์คํ
ํ๊ฒฝ๋ณ์์ ์ค์ ์ ํด์ฃผ์
์ผ ์ถ๋ ฅ์ด ๋ฉ๋๋ค.
7. ๊ทธํ Facebook app Page๋ก ๋์๊ฐ์
์ค์ -> ํ๋ซํผ ์ถ๊ฐ ->...
Posted by ColaLib on ์ค์ 2:15 with No comments
1. ํ์ด์ค๋ถ์ ๋ก๊ทธ์ธ ํ ๊ฐ๋ฐ์ ํ์ด์ง์ ์
๊ฐ๋ฐ์ ํ์ด์ง ์ฃผ์
2. ์๋จ์ ๋ฉ๋ด์์ ์ฑ -> Create New App ํด๋ฆญ
3. App ์ค์ ํ ์ดํ๋ฆฌ์ผ์ด์
๋ง๋ค๊ธฐ ์คํ
Display Name - ๋ง๋ค App์ด๋ฆ
Namespace - App์ด ์ฌ์ฉํ NameSpace(์ ํ์ฌํญ)
3. ๊ทธํ ์์ฑ๋ App DashBoard ํ์ธ.
End.
์ฌ๊ธฐ๊น์งํ์๋ฉด Facebook SDK๋ฅผ ํ์ฉํ๊ธฐ์ํ facebook app์ ๋ฑ๋ก์ ํ์
จ๋ค๊ณ
๋ณด์๋ฉด๋ฉ๋๋ค. ๋ค์ Step์์ ์ดํ ๊ธฐ๋ณธ์ ์ธ ์ฐ๋๋ฒ์ ์ ๋ฆฌ ํด๋ณด๊ฒ ์ต๋๋ค....
2014๋ 1์ 21์ผ ํ์์ผ
Posted by ColaLib on ์ค์ 3:51 with No comments
1. ํฌ์คํ
ํ๊ฒฝ
- Unity 4.2.1 Pro Version
Unity ๋ฒ์ ์ ์๊ด์์ผ๋ Facebook plugin ์์ฒด๊ฐ Android native(jarํ์ผ) ํ์์ผ๋ก ๋์ด์๊ธฐ๋๋ฌธ์ Pro version Only ๋ผ๊ณ ์๊ฐํ์๋ฉด ๋ฉ๋๋ค.
- Facebook SDK for Unity 4.3.3 pakage
Facebook SDK 4.3.4 ๋ฒ์ ๋ถํฐ๋ Unity 4.3 ์ด์์ ์๊ตฌํ๋ ์ฃผ์ ํ์๊ธธ ๋ฐ๋๋๋ค.
4.2.1 ๋ฒ์ ์ดํ๋ก ์ฌ์ฉํ์๊ธฐ๋ฅผ ์ ๊ทน ์ถ์ฒ๋๋ฆฝ๋๋ค. 3.x ๋ฒ์ ์ SDK(์ด๊ธฐ)๋ ์ฌ์ฉํด๋ดค์๋๋ฐ FB callback ๋ฉ์๋ delegate ํ์
์์ฒด๊ฐ void() ํ์์ด๋ผ event ์ฒ๋ฆฌํ๋๊ฒ ๋ง์ด ๋ง์ด ๊น๋ค๋ก์ ๋๊ฒ์ผ๋ก ๊ธฐ์ต๋ฉ๋๋ค. 4.x์ดํ์๋ void(FBresult) ํ์์ผ๋ก ๋ด๊ปด์ ์ฝ๋ฐฑ์ ํ์ฑํ์๊ฐ ํจ์ฌ ์์ํ๋๊ตฐ์.(3.x ๋ฒ์ ์ ๊ฒฝ์ฐ์๋ ์ ๊น ํ
์คํธ ์ฌ๋ง ์คํํด๋ณด๊ณ ์์ค์ข ์ดํด๋ณธ๊ฒ ์ ๋ถ๋ผ ์ ํํ๊ฒ ๊ธฐ์ต๋์ง๋ ์๋๋ค๋ ํจ์ ...)... ์๋ฌดํผ ์ต์ ๋ฒ์ ์ ์ ์ฉํฉ๋๋ค ^^
์ฐธ์กฐ : https://developers.facebook.com/docs/unity/downloads
-...
ํผ๋ ๊ตฌ๋
ํ๊ธฐ:
๊ธ (Atom)