SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
製作 Unity Plugin for iOS 
Johnny Sung 
2014.09.11 @ CocoaHeads Taipei
Johnny Sung 
Mobile devices Developer 
https://fb.com/j796160836 
https://plus.google.com/+JohnnySung 
http://about.me/j796160836
我是不是來錯場合了? 
這裡是CocoaHeads...
Unity的概念 
• GameObject 
• Component
GameObject 
GameObject
GameObject 
Component
⼀一個空⽩白的 Component ⻑⾧長這樣 
using UnityEngine; 
using System.Collections; 
public class testComponent : MonoBehaviour { 
// Use this for initialization 
void Start () { 
} 
// Update is called once per frame 
void Update () { 
} 
}
MonoBehaviour 的⽣生命週期 
• Awake() 創造時初始化 
• Start() 執⾏行時初始化 
• Update() 繪圖迴圈 (依效能⽽而定,例60fps) 
• FixedUpdate() 物理迴圈
http://docs.unity3d.com/ScriptReference/
說好的 iOS Plugin 呢?
Unity Plugin 的呼叫⽅方式 
C# 
(呼叫的接⼝口) 
C 
(⾃自定義的接⼝口) Objective-C 
(Unity Engine) (Native) 
Objective-C 
UnitySendMessage() 
C# 
(對應的接⼝口)
! 
#import <Foundation/Foundation.h> 
#import <UIKit/UIKit.h> 
! 
extern UIViewController* UnityGetGLViewController(); 
extern "C" void UnitySendMessage(const char*, const char*, const char*); 
! 
@interface MyViewPlugin : NSObject 
@property (nonatomic, strong) UIView* myView; 
@property (nonatomic, strong) NSString* gameObjectName; 
@end 
MyViewPlugin.mm 
Get Started !
! 
@implementation MyViewPlugin 
! 
- (id)initWithGameObjectName:(const char*)gameObjectName_ 
{ 
self = [super init]; 
UIView* view = UnityGetGLViewController().view; 
self.myView = [[UIView alloc] initWithFrame:view.frame]; 
self.myView.backgroundColor = [UIColor blueColor]; 
[view addSubview:self.myView]; 
self.gameObjectName = [NSString stringWithUTF8String:gameObjectName_]; 
return self; 
} 
! 
- (void)dealloc 
{ 
[self.myView removeFromSuperview]; 
} 
! 
@end 
!! 
MyViewPlugin.mm 
就只是⼀一個藍⾊色的View ( ˊ_>ˋ )
⾃自訂 C語⾔言 接⼝口 
! 
extern "C" { 
void* _MyViewPlugin_Init(const char* gameObjectName); 
void _MyViewPlugin_Destroy(void* instance); 
} 
! 
void* _MyViewPlugin_Init(const char* gameObjectName) 
{ 
id instance = [[MyViewPlugin alloc] initWithGameObjectName:gameObjectName]; 
return (__bridge void*)instance; 
} 
! 
void _MyViewPlugin_Destroy(void* instance) 
{ 
MyViewPlugin* myViewPlugin = (__bridge MyViewPlugin*)instance; 
myViewPlugin = nil; 
} 
MyViewPlugin.mm
跟Unity相連接!
! 
public class MyViewObject : MonoBehaviour 
{ 
IntPtr myView; 
#if UNITY_IPHONE 
[DllImport("__Internal")] 
private static extern IntPtr _MyViewPlugin_Init(string gameObject); 
[DllImport("__Internal")] 
private static extern int _MyViewPlugin_Destroy(IntPtr instance); 
#endif 
public void Init() 
{ 
#if UNITY_IPHONE 
myView = _MyViewPlugin_Init(name); 
#endif 
} 
void OnDestroy() 
{ 
#if UNITY_IPHONE 
if (myView == IntPtr.Zero) 
return; 
_MyViewPlugin_Destroy(myView); 
#endif 
} 
} 
MyViewObject.cs 
C#對應的接⼝口
! 
public class SampleMyView : MonoBehaviour 
{ 
MyViewObject myViewObject; 
void Start() 
{ 
myViewObject = 
(new GameObject("MyViewObject")).AddComponent<MyViewObject>(); 
myViewObject.Init(); 
} 
} 
SampleMyView.cs 
配合⽣生命週期 並使⽤用之 
建⽴立⼀一個GameObject 
增加⼀一個MyViewObject這個Component
從 Unity 呼叫 Obj-C ⽅方法 
extern "C" { 
void _MyViewPlugin_Destroy(void* instance); 
} 
C# 宣告 
C# 傳送 
Objective-C 接收 
MyViewPlugin.mm 
MyViewObject.cs 
C 宣告 
! 
[DllImport("__Internal")] 
private static extern int _MyViewPlugin_Destroy(IntPtr instance); 
_MyViewPlugin_Destroy(myView); 
void _MyViewPlugin_Destroy(void* instance) 
{ 
! 
} 
MyViewObject.cs 
MyViewPlugin.mm
從Obj-C 回傳 Unity 資料 
extern "C" void UnitySendMessage(const char*, const char*, const char*); 
Objective-C 傳送 
UnitySendMessage([self.gameObjectName UTF8String], 
"CallFromObjC", [@"Hello" UTF8String]); 
C# 接收 
public void CallFromObjC(string message) 
{ 
Debug.Log (message); 
} 
MyViewPlugin.mm 
MyViewObject.cs 
C 宣告
從Obj-C 回傳 Unity 資料 
UnitySendMessage(const char*, const char*, const char*); 
GameObject Name Method Name Parameter
打包執⾏行
打包Obj-C進Unity (1/2) 
• 路徑設定 (需⾃自⾏行開⽴立資料夾) 
• Assets/Plugins/iOS 
• 放⼊入Obj-C的程式碼 
• .mm 
• .a 
• Unity編譯! (產⽣生xcode專案)
打包Obj-C進Unity (2/2) 
• 加⼊入所需的Framework 
• 調整Complier Flags ( -fobjc-arc ) 
• 依需求調整所需的設定 
• Framework Search Paths 
• Other Linker Flags 
• Info-plist 
• xcode專案編譯
調整Complier Flags
放上 Asset Store 賺外快!
Demo Project 
https://github.com/j796160836/Unity-iOSPlugins
Q & A
Great References 
• Unity Webview 
• https://github.com/gree/unity-webview 
• Building Plugins for iOS 
• http://docs.unity3d.com/Manual/PluginsForIOS.html 
• Plugins (Pro/Mobile-Only Feature) 
• http://docs.unity3d.com/Manual/Plugins.html 
• 懂點Unity Plugin,替荷包省點錢!(iOS篇) 
• http://www.unityin.com/2013/05/%E6%87%82%E9%BB%9Eunity-plugin%EF 
%BC%8C%E6%9B%BF%E8%8D%B7%E5%8C%85%E7%9C%81%E9%BB 
%9E%E9%8C%A2%EF%BC%81ios%E7%AF%87/
Thanks !
補充:Unity 畫⾯面的按鈕 
public class buttonUI : MonoBehaviour { 
void OnGUI () 
{ 
if (GUI.Button (new Rect (20, 10, 100, 40), "ButtonText")) { 
Debug.Log("Clicked!"); 
} 
} 
}
補充:MonoBehaviour 的⽣生命週期 
• Awake():⽤用於在游戲開始之前初始化變量或游戲狀態,在程式整個⽣生命周期內僅被執⾏行⼀一次。Awake 
在所有GameObject初始化之後執⾏行,因此可以在⽅方法中安全地與GameObject進⾏行通信。 
• Start():僅在所有程式的Update⽅方法第⼀一次被呼叫前執⾏行,且僅在程式實例被啟⽤用時執⾏行。Start在所 
有程式的Awake⽅方法全部執⾏行完成後才執⾏行。 
• Update():在每次渲染新的⼀一個Frame時執⾏行。由於該⽅方法呼叫的頻率與設備性能、被渲染對象有關, 
導致同⼀一游戲在不同機器的效果不⼀一致(因為Update⽅方法的執⾏行時間間隔不⼀一致)。 
• FixedUpdate():在固定的時間間隔執⾏行,不受游戲幀率(FPS)的影響。所以處理RigidBody時最好⽤用 
FixedUpdate。FixedUpdate的時間間隔可在⼯工程設置中更改(Edit --> Project Setting --> Time)。 
• LateUpdate():所有程式的Update⽅方法呼叫後執⾏行。例如相機跟隨即是在LateUpdate⽅方法中實現。 
• OnGUI():在渲染和處理GUI事件時執⾏行。 
• Reset():⽤用⼾戶點擊屬性監視⾯面板(Inspector)的Reset按鈕或⾸首次添加該組件時執⾏行,僅在編輯模式下執 
⾏行。 
• OnDestroy():當GameObject將被銷毀時執⾏行。 
http://www.cnblogs.com/lunarfire/p/3494716.html
補充:有關const char * 
const char * const myString; 
指向記憶體位置的內容 
指標所指向的記憶體位置
補充:有關const char * 
• char * myString; 
• 都可以改 
• const char * myString; ( 或 char const * myString; ) 
• 字串內容不能動,但指向的位址可以改 
• char * const myString; 
• 指的位址不能動,但是位址裡的字串可以改 
• const char * const myString; 
• 都不能改 
http://www.programmer-club.com.tw/ShowSameTitleN/c/37760.html
void * 與 id 
• void * 
• a reference to some random chunk o' memory with untyped/ 
unknown contents 
• ⼀一個任意指標,可⽤用來指向任何型別或內容的 
記憶體區塊 
• id 
• a reference to some random Objective-C object of unknown 
class 
• ⼀一個任意指標,可以指向 Obj-C 中的物件 
http://stackoverflow.com/questions/1304176/objective-c-difference-between-id-and-void 
http://justlink-linus.blogspot.tw/2012/11/id-void-void-pointer.html
補充:Assets資料夾保留字 
• Standard Assets 
• Editor 
• Plugins 
• Plugins/x86 
• Plugins/Android 
• Plugins/iOS 
• Resources 
http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder
想做遊戲? 
Unity 應⽤用領域 
https://www.facebook.com/groups/581769871867384

Contenu connexe

Tendances

ヒストリア HelixCore(Perforce) 運用レギュレーションドキュメント
ヒストリア HelixCore(Perforce) 運用レギュレーションドキュメントヒストリア HelixCore(Perforce) 運用レギュレーションドキュメント
ヒストリア HelixCore(Perforce) 運用レギュレーションドキュメントhistoria_Inc
 
UE4プログラマー勉強会 in 大阪 -エンジンの内部挙動について
UE4プログラマー勉強会 in 大阪 -エンジンの内部挙動についてUE4プログラマー勉強会 in 大阪 -エンジンの内部挙動について
UE4プログラマー勉強会 in 大阪 -エンジンの内部挙動についてcom044
 
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る! | UNREAL FEST EXTREME 2020 WINTER
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る!  | UNREAL FEST EXTREME 2020 WINTERUE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る!  | UNREAL FEST EXTREME 2020 WINTER
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る! | UNREAL FEST EXTREME 2020 WINTERエピック・ゲームズ・ジャパン Epic Games Japan
 
[UE4]自動テストでもっと楽したい!
[UE4]自動テストでもっと楽したい![UE4]自動テストでもっと楽したい!
[UE4]自動テストでもっと楽したい!com044
 
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMERエピック・ゲームズ・ジャパン Epic Games Japan
 
誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ
誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ
誰もAddressableについて語らないなら、自分が語るしかない…ッッッッTatsuhiko Yamamura
 
UE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみたUE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみたMasahiko Nakamura
 
UE4エンジンソースをMacでビルドしてみた
UE4エンジンソースをMacでビルドしてみたUE4エンジンソースをMacでビルドしてみた
UE4エンジンソースをMacでビルドしてみたYuuki Ogino
 
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -historia_Inc
 
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發Weizhong Yang
 
Deep Dive async/await in Unity with UniTask(UniRx.Async)
Deep Dive async/await in Unity with UniTask(UniRx.Async)Deep Dive async/await in Unity with UniTask(UniRx.Async)
Deep Dive async/await in Unity with UniTask(UniRx.Async)Yoshifumi Kawai
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Gerke Max Preussner
 

Tendances (20)

Epic Online Services でできること
Epic Online Services でできることEpic Online Services でできること
Epic Online Services でできること
 
猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0
猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0
猫でも分かるUE4を使ったARコンテンツ作り方 初級編 ver 1.0.0
 
ヒストリア HelixCore(Perforce) 運用レギュレーションドキュメント
ヒストリア HelixCore(Perforce) 運用レギュレーションドキュメントヒストリア HelixCore(Perforce) 運用レギュレーションドキュメント
ヒストリア HelixCore(Perforce) 運用レギュレーションドキュメント
 
猫でも分かるUMG
猫でも分かるUMG猫でも分かるUMG
猫でも分かるUMG
 
UE4プログラマー勉強会 in 大阪 -エンジンの内部挙動について
UE4プログラマー勉強会 in 大阪 -エンジンの内部挙動についてUE4プログラマー勉強会 in 大阪 -エンジンの内部挙動について
UE4プログラマー勉強会 in 大阪 -エンジンの内部挙動について
 
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る! | UNREAL FEST EXTREME 2020 WINTER
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る!  | UNREAL FEST EXTREME 2020 WINTERUE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る!  | UNREAL FEST EXTREME 2020 WINTER
UE4×Switchで60FPSの(ネットワーク)対戦アクションをなんとかして作る! | UNREAL FEST EXTREME 2020 WINTER
 
UE4 MultiPlayer Online Deep Dive 基礎編1 -Getting Started- (historia様ご講演) #UE4DD
UE4 MultiPlayer Online Deep Dive 基礎編1 -Getting Started-  (historia様ご講演) #UE4DDUE4 MultiPlayer Online Deep Dive 基礎編1 -Getting Started-  (historia様ご講演) #UE4DD
UE4 MultiPlayer Online Deep Dive 基礎編1 -Getting Started- (historia様ご講演) #UE4DD
 
[UE4]自動テストでもっと楽したい!
[UE4]自動テストでもっと楽したい![UE4]自動テストでもっと楽したい!
[UE4]自動テストでもっと楽したい!
 
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
『FINAL FANTASY VII REMAKE』におけるプロファイリングと最適化事例 UNREAL FEST EXTREME 2021 SUMMER
 
誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ
誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ
誰もAddressableについて語らないなら、自分が語るしかない…ッッッッ
 
猫でも分かる UE4の新しいサンプル「Action RPG」について
猫でも分かる UE4の新しいサンプル「Action RPG」について猫でも分かる UE4の新しいサンプル「Action RPG」について
猫でも分かる UE4の新しいサンプル「Action RPG」について
 
UE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみたUE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみた
 
UE4エンジンソースをMacでビルドしてみた
UE4エンジンソースをMacでビルドしてみたUE4エンジンソースをMacでビルドしてみた
UE4エンジンソースをMacでビルドしてみた
 
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
 
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
 
UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 (日本語訳)
UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 (日本語訳)UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 (日本語訳)
UE4 Performance and Profiling | Unreal Dev Day Montreal 2017 (日本語訳)
 
UE4 MultiPlayer Online Deep Dive 基礎編2 -Traveling- (historia様ご講演) #ue4dd
UE4 MultiPlayer Online Deep Dive 基礎編2 -Traveling-  (historia様ご講演)  #ue4ddUE4 MultiPlayer Online Deep Dive 基礎編2 -Traveling-  (historia様ご講演)  #ue4dd
UE4 MultiPlayer Online Deep Dive 基礎編2 -Traveling- (historia様ご講演) #ue4dd
 
Deep Dive async/await in Unity with UniTask(UniRx.Async)
Deep Dive async/await in Unity with UniTask(UniRx.Async)Deep Dive async/await in Unity with UniTask(UniRx.Async)
Deep Dive async/await in Unity with UniTask(UniRx.Async)
 
Nintendo Switch『OCTOPATH TRAVELER』はこうして作られた
Nintendo Switch『OCTOPATH TRAVELER』はこうして作られたNintendo Switch『OCTOPATH TRAVELER』はこうして作られた
Nintendo Switch『OCTOPATH TRAVELER』はこうして作られた
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4
 

En vedette

Unity3D Plugins Development Guide
Unity3D Plugins Development GuideUnity3D Plugins Development Guide
Unity3D Plugins Development GuideKaiJung Chen
 
製作 Unity Plugin for Android
製作 Unity Plugin for Android製作 Unity Plugin for Android
製作 Unity Plugin for AndroidJohnny Sung
 
我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享Morning Kao
 
Avoid loss of hair while coding Unity3D plugin for mobile
Avoid loss of hair while coding Unity3D plugin for mobileAvoid loss of hair while coding Unity3D plugin for mobile
Avoid loss of hair while coding Unity3D plugin for mobileValerio Riva
 
[Gstar 2013] Unity Security
[Gstar 2013] Unity Security[Gstar 2013] Unity Security
[Gstar 2013] Unity SecuritySeungmin Shin
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and PerformanceDevGAMM Conference
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Alexander Dolbilov
 
Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...
Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...
Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...Oleg Zhuravlev
 
Proposal format
Proposal formatProposal format
Proposal formatMr SMAK
 

En vedette (9)

Unity3D Plugins Development Guide
Unity3D Plugins Development GuideUnity3D Plugins Development Guide
Unity3D Plugins Development Guide
 
製作 Unity Plugin for Android
製作 Unity Plugin for Android製作 Unity Plugin for Android
製作 Unity Plugin for Android
 
我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享我的GCM時代-推送訊息的實做分享
我的GCM時代-推送訊息的實做分享
 
Avoid loss of hair while coding Unity3D plugin for mobile
Avoid loss of hair while coding Unity3D plugin for mobileAvoid loss of hair while coding Unity3D plugin for mobile
Avoid loss of hair while coding Unity3D plugin for mobile
 
[Gstar 2013] Unity Security
[Gstar 2013] Unity Security[Gstar 2013] Unity Security
[Gstar 2013] Unity Security
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
 
Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...
Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...
Software proposal sample_project_1-_web_site_development_by_zx_7_of_november_...
 
Proposal format
Proposal formatProposal format
Proposal format
 

Similaire à 製作 Unity Plugin for iOS

Java23种设计模式(总结)
Java23种设计模式(总结)Java23种设计模式(总结)
Java23种设计模式(总结)xuanlong282
 
20140222 Unity Windows lab 移轉實作營
20140222 Unity Windows lab 移轉實作營 20140222 Unity Windows lab 移轉實作營
20140222 Unity Windows lab 移轉實作營 Meng-Ru (Raymond) Tsai
 
Game development using monogame
Game development using monogameGame development using monogame
Game development using monogamePower Wu
 
用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端
用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端 用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端
用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端 升煌 黃
 
Athrun instrument driver
Athrun instrument driverAthrun instrument driver
Athrun instrument driverdrewz lin
 
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例Justin Lee
 
Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)Will Huang
 
行動商務實務 - PhoneGap Advance
行動商務實務 - PhoneGap Advance行動商務實務 - PhoneGap Advance
行動商務實務 - PhoneGap AdvanceMy own sweet home!
 
DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學River Wang
 
Mojito 開發 mobile web 實戰經驗談
Mojito 開發 mobile web 實戰經驗談Mojito 開發 mobile web 實戰經驗談
Mojito 開發 mobile web 實戰經驗談Yu-Wei Chuang
 
怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google Maps怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google MapsWeizhong Yang
 
由一个简单的程序谈起――之二
由一个简单的程序谈起――之二由一个简单的程序谈起――之二
由一个简单的程序谈起――之二yiditushe
 

Similaire à 製作 Unity Plugin for iOS (20)

Java23种设计模式(总结)
Java23种设计模式(总结)Java23种设计模式(总结)
Java23种设计模式(总结)
 
I os 07
I os 07I os 07
I os 07
 
20140222 Unity Windows lab 移轉實作營
20140222 Unity Windows lab 移轉實作營 20140222 Unity Windows lab 移轉實作營
20140222 Unity Windows lab 移轉實作營
 
Game development using monogame
Game development using monogameGame development using monogame
Game development using monogame
 
用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端
用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端 用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端
用 Standalone Component 來寫 Angular 吧! - STUDY4.TW 2023 小聚 - 聊前端
 
Unity遊戲設計- Unity基礎指引
Unity遊戲設計- Unity基礎指引Unity遊戲設計- Unity基礎指引
Unity遊戲設計- Unity基礎指引
 
Unity遊戲程式設計- Unity基礎指引
Unity遊戲程式設計- Unity基礎指引Unity遊戲程式設計- Unity基礎指引
Unity遊戲程式設計- Unity基礎指引
 
Athrun instrument driver
Athrun instrument driverAthrun instrument driver
Athrun instrument driver
 
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
2011/08/20跨平台行動應用程式使用者介面開發—以titanium mobile為例
 
I os 01
I os 01I os 01
I os 01
 
YUI 3 菜鳥救星
YUI 3 菜鳥救星YUI 3 菜鳥救星
YUI 3 菜鳥救星
 
Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)Micro-frontends with Angular 10 (Modern Web 2020)
Micro-frontends with Angular 10 (Modern Web 2020)
 
2021laravelconftwslides10
2021laravelconftwslides102021laravelconftwslides10
2021laravelconftwslides10
 
005
005005
005
 
行動商務實務 - PhoneGap Advance
行動商務實務 - PhoneGap Advance行動商務實務 - PhoneGap Advance
行動商務實務 - PhoneGap Advance
 
DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學
 
Mojito 開發 mobile web 實戰經驗談
Mojito 開發 mobile web 實戰經驗談Mojito 開發 mobile web 實戰經驗談
Mojito 開發 mobile web 實戰經驗談
 
怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google Maps怎樣在 Flutter app 中使用 Google Maps
怎樣在 Flutter app 中使用 Google Maps
 
I os 16
I os 16I os 16
I os 16
 
由一个简单的程序谈起――之二
由一个简单的程序谈起――之二由一个简单的程序谈起――之二
由一个简单的程序谈起――之二
 

Plus de Johnny Sung

[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023
[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023
[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023Johnny Sung
 
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023Johnny Sung
 
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) [Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) Johnny Sung
 
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022Johnny Sung
 
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020與 Sign in with Apple 的愛恨情仇 @ iPlayground2020
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020Johnny Sung
 
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020Johnny Sung
 
談談 Android constraint layout
談談 Android constraint layout談談 Android constraint layout
談談 Android constraint layoutJohnny Sung
 
炎炎夏日學 Android 課程 - Part3: Android app 實作
炎炎夏日學 Android 課程 - Part3: Android app 實作炎炎夏日學 Android 課程 - Part3: Android app 實作
炎炎夏日學 Android 課程 - Part3: Android app 實作Johnny Sung
 
炎炎夏日學 Android 課程 - Part1: Kotlin 語法介紹
炎炎夏日學 Android 課程 -  Part1: Kotlin 語法介紹炎炎夏日學 Android 課程 -  Part1: Kotlin 語法介紹
炎炎夏日學 Android 課程 - Part1: Kotlin 語法介紹Johnny Sung
 
炎炎夏日學 Android 課程 - Part2: Android 元件介紹
炎炎夏日學 Android 課程 - Part2: Android 元件介紹炎炎夏日學 Android 課程 - Part2: Android 元件介紹
炎炎夏日學 Android 課程 - Part2: Android 元件介紹Johnny Sung
 
炎炎夏日學 Android 課程 - Part 0: 環境搭建
炎炎夏日學 Android 課程 - Part 0: 環境搭建炎炎夏日學 Android 課程 - Part 0: 環境搭建
炎炎夏日學 Android 課程 - Part 0: 環境搭建Johnny Sung
 
About Mobile Accessibility
About Mobile AccessibilityAbout Mobile Accessibility
About Mobile AccessibilityJohnny Sung
 
Introductions of Messaging bot 做聊天機器人
Introductions of Messaging bot 做聊天機器人Introductions of Messaging bot 做聊天機器人
Introductions of Messaging bot 做聊天機器人Johnny Sung
 
First meet with Android Auto
First meet with Android AutoFirst meet with Android Auto
First meet with Android AutoJohnny Sung
 
Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇
Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇
Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇Johnny Sung
 
[MOPCON 2015] 談談行動裝置的 Accessibility
[MOPCON 2015] 談談行動裝置的 Accessibility[MOPCON 2015] 談談行動裝置的 Accessibility
[MOPCON 2015] 談談行動裝置的 AccessibilityJohnny Sung
 
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇Johnny Sung
 
A Quick look at ANCS (Apple Notification Center Service)
A Quick look at ANCS (Apple Notification Center Service)A Quick look at ANCS (Apple Notification Center Service)
A Quick look at ANCS (Apple Notification Center Service)Johnny Sung
 
uPresenter, the story.
uPresenter, the story.uPresenter, the story.
uPresenter, the story.Johnny Sung
 
Android Wear Development
Android Wear DevelopmentAndroid Wear Development
Android Wear DevelopmentJohnny Sung
 

Plus de Johnny Sung (20)

[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023
[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023
[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @Devfest Taipei 2023
 
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
 
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang) [Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
 
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022
 
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020與 Sign in with Apple 的愛恨情仇 @ iPlayground2020
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020
 
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
 
談談 Android constraint layout
談談 Android constraint layout談談 Android constraint layout
談談 Android constraint layout
 
炎炎夏日學 Android 課程 - Part3: Android app 實作
炎炎夏日學 Android 課程 - Part3: Android app 實作炎炎夏日學 Android 課程 - Part3: Android app 實作
炎炎夏日學 Android 課程 - Part3: Android app 實作
 
炎炎夏日學 Android 課程 - Part1: Kotlin 語法介紹
炎炎夏日學 Android 課程 -  Part1: Kotlin 語法介紹炎炎夏日學 Android 課程 -  Part1: Kotlin 語法介紹
炎炎夏日學 Android 課程 - Part1: Kotlin 語法介紹
 
炎炎夏日學 Android 課程 - Part2: Android 元件介紹
炎炎夏日學 Android 課程 - Part2: Android 元件介紹炎炎夏日學 Android 課程 - Part2: Android 元件介紹
炎炎夏日學 Android 課程 - Part2: Android 元件介紹
 
炎炎夏日學 Android 課程 - Part 0: 環境搭建
炎炎夏日學 Android 課程 - Part 0: 環境搭建炎炎夏日學 Android 課程 - Part 0: 環境搭建
炎炎夏日學 Android 課程 - Part 0: 環境搭建
 
About Mobile Accessibility
About Mobile AccessibilityAbout Mobile Accessibility
About Mobile Accessibility
 
Introductions of Messaging bot 做聊天機器人
Introductions of Messaging bot 做聊天機器人Introductions of Messaging bot 做聊天機器人
Introductions of Messaging bot 做聊天機器人
 
First meet with Android Auto
First meet with Android AutoFirst meet with Android Auto
First meet with Android Auto
 
Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇
Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇
Everything About Bluetooth (淺談藍牙 4.0) - Peripheral 篇
 
[MOPCON 2015] 談談行動裝置的 Accessibility
[MOPCON 2015] 談談行動裝置的 Accessibility[MOPCON 2015] 談談行動裝置的 Accessibility
[MOPCON 2015] 談談行動裝置的 Accessibility
 
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
Everything About Bluetooth (淺談藍牙 4.0) - Central 篇
 
A Quick look at ANCS (Apple Notification Center Service)
A Quick look at ANCS (Apple Notification Center Service)A Quick look at ANCS (Apple Notification Center Service)
A Quick look at ANCS (Apple Notification Center Service)
 
uPresenter, the story.
uPresenter, the story.uPresenter, the story.
uPresenter, the story.
 
Android Wear Development
Android Wear DevelopmentAndroid Wear Development
Android Wear Development
 

製作 Unity Plugin for iOS

  • 1. 製作 Unity Plugin for iOS Johnny Sung 2014.09.11 @ CocoaHeads Taipei
  • 2. Johnny Sung Mobile devices Developer https://fb.com/j796160836 https://plus.google.com/+JohnnySung http://about.me/j796160836
  • 7. ⼀一個空⽩白的 Component ⻑⾧長這樣 using UnityEngine; using System.Collections; public class testComponent : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
  • 8. MonoBehaviour 的⽣生命週期 • Awake() 創造時初始化 • Start() 執⾏行時初始化 • Update() 繪圖迴圈 (依效能⽽而定,例60fps) • FixedUpdate() 物理迴圈
  • 9.
  • 12. Unity Plugin 的呼叫⽅方式 C# (呼叫的接⼝口) C (⾃自定義的接⼝口) Objective-C (Unity Engine) (Native) Objective-C UnitySendMessage() C# (對應的接⼝口)
  • 13. ! #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> ! extern UIViewController* UnityGetGLViewController(); extern "C" void UnitySendMessage(const char*, const char*, const char*); ! @interface MyViewPlugin : NSObject @property (nonatomic, strong) UIView* myView; @property (nonatomic, strong) NSString* gameObjectName; @end MyViewPlugin.mm Get Started !
  • 14. ! @implementation MyViewPlugin ! - (id)initWithGameObjectName:(const char*)gameObjectName_ { self = [super init]; UIView* view = UnityGetGLViewController().view; self.myView = [[UIView alloc] initWithFrame:view.frame]; self.myView.backgroundColor = [UIColor blueColor]; [view addSubview:self.myView]; self.gameObjectName = [NSString stringWithUTF8String:gameObjectName_]; return self; } ! - (void)dealloc { [self.myView removeFromSuperview]; } ! @end !! MyViewPlugin.mm 就只是⼀一個藍⾊色的View ( ˊ_>ˋ )
  • 15. ⾃自訂 C語⾔言 接⼝口 ! extern "C" { void* _MyViewPlugin_Init(const char* gameObjectName); void _MyViewPlugin_Destroy(void* instance); } ! void* _MyViewPlugin_Init(const char* gameObjectName) { id instance = [[MyViewPlugin alloc] initWithGameObjectName:gameObjectName]; return (__bridge void*)instance; } ! void _MyViewPlugin_Destroy(void* instance) { MyViewPlugin* myViewPlugin = (__bridge MyViewPlugin*)instance; myViewPlugin = nil; } MyViewPlugin.mm
  • 17. ! public class MyViewObject : MonoBehaviour { IntPtr myView; #if UNITY_IPHONE [DllImport("__Internal")] private static extern IntPtr _MyViewPlugin_Init(string gameObject); [DllImport("__Internal")] private static extern int _MyViewPlugin_Destroy(IntPtr instance); #endif public void Init() { #if UNITY_IPHONE myView = _MyViewPlugin_Init(name); #endif } void OnDestroy() { #if UNITY_IPHONE if (myView == IntPtr.Zero) return; _MyViewPlugin_Destroy(myView); #endif } } MyViewObject.cs C#對應的接⼝口
  • 18. ! public class SampleMyView : MonoBehaviour { MyViewObject myViewObject; void Start() { myViewObject = (new GameObject("MyViewObject")).AddComponent<MyViewObject>(); myViewObject.Init(); } } SampleMyView.cs 配合⽣生命週期 並使⽤用之 建⽴立⼀一個GameObject 增加⼀一個MyViewObject這個Component
  • 19. 從 Unity 呼叫 Obj-C ⽅方法 extern "C" { void _MyViewPlugin_Destroy(void* instance); } C# 宣告 C# 傳送 Objective-C 接收 MyViewPlugin.mm MyViewObject.cs C 宣告 ! [DllImport("__Internal")] private static extern int _MyViewPlugin_Destroy(IntPtr instance); _MyViewPlugin_Destroy(myView); void _MyViewPlugin_Destroy(void* instance) { ! } MyViewObject.cs MyViewPlugin.mm
  • 20. 從Obj-C 回傳 Unity 資料 extern "C" void UnitySendMessage(const char*, const char*, const char*); Objective-C 傳送 UnitySendMessage([self.gameObjectName UTF8String], "CallFromObjC", [@"Hello" UTF8String]); C# 接收 public void CallFromObjC(string message) { Debug.Log (message); } MyViewPlugin.mm MyViewObject.cs C 宣告
  • 21. 從Obj-C 回傳 Unity 資料 UnitySendMessage(const char*, const char*, const char*); GameObject Name Method Name Parameter
  • 23. 打包Obj-C進Unity (1/2) • 路徑設定 (需⾃自⾏行開⽴立資料夾) • Assets/Plugins/iOS • 放⼊入Obj-C的程式碼 • .mm • .a • Unity編譯! (產⽣生xcode專案)
  • 24.
  • 25.
  • 26. 打包Obj-C進Unity (2/2) • 加⼊入所需的Framework • 調整Complier Flags ( -fobjc-arc ) • 依需求調整所需的設定 • Framework Search Paths • Other Linker Flags • Info-plist • xcode專案編譯
  • 28. 放上 Asset Store 賺外快!
  • 30. Q & A
  • 31. Great References • Unity Webview • https://github.com/gree/unity-webview • Building Plugins for iOS • http://docs.unity3d.com/Manual/PluginsForIOS.html • Plugins (Pro/Mobile-Only Feature) • http://docs.unity3d.com/Manual/Plugins.html • 懂點Unity Plugin,替荷包省點錢!(iOS篇) • http://www.unityin.com/2013/05/%E6%87%82%E9%BB%9Eunity-plugin%EF %BC%8C%E6%9B%BF%E8%8D%B7%E5%8C%85%E7%9C%81%E9%BB %9E%E9%8C%A2%EF%BC%81ios%E7%AF%87/
  • 33. 補充:Unity 畫⾯面的按鈕 public class buttonUI : MonoBehaviour { void OnGUI () { if (GUI.Button (new Rect (20, 10, 100, 40), "ButtonText")) { Debug.Log("Clicked!"); } } }
  • 34. 補充:MonoBehaviour 的⽣生命週期 • Awake():⽤用於在游戲開始之前初始化變量或游戲狀態,在程式整個⽣生命周期內僅被執⾏行⼀一次。Awake 在所有GameObject初始化之後執⾏行,因此可以在⽅方法中安全地與GameObject進⾏行通信。 • Start():僅在所有程式的Update⽅方法第⼀一次被呼叫前執⾏行,且僅在程式實例被啟⽤用時執⾏行。Start在所 有程式的Awake⽅方法全部執⾏行完成後才執⾏行。 • Update():在每次渲染新的⼀一個Frame時執⾏行。由於該⽅方法呼叫的頻率與設備性能、被渲染對象有關, 導致同⼀一游戲在不同機器的效果不⼀一致(因為Update⽅方法的執⾏行時間間隔不⼀一致)。 • FixedUpdate():在固定的時間間隔執⾏行,不受游戲幀率(FPS)的影響。所以處理RigidBody時最好⽤用 FixedUpdate。FixedUpdate的時間間隔可在⼯工程設置中更改(Edit --> Project Setting --> Time)。 • LateUpdate():所有程式的Update⽅方法呼叫後執⾏行。例如相機跟隨即是在LateUpdate⽅方法中實現。 • OnGUI():在渲染和處理GUI事件時執⾏行。 • Reset():⽤用⼾戶點擊屬性監視⾯面板(Inspector)的Reset按鈕或⾸首次添加該組件時執⾏行,僅在編輯模式下執 ⾏行。 • OnDestroy():當GameObject將被銷毀時執⾏行。 http://www.cnblogs.com/lunarfire/p/3494716.html
  • 35. 補充:有關const char * const char * const myString; 指向記憶體位置的內容 指標所指向的記憶體位置
  • 36. 補充:有關const char * • char * myString; • 都可以改 • const char * myString; ( 或 char const * myString; ) • 字串內容不能動,但指向的位址可以改 • char * const myString; • 指的位址不能動,但是位址裡的字串可以改 • const char * const myString; • 都不能改 http://www.programmer-club.com.tw/ShowSameTitleN/c/37760.html
  • 37. void * 與 id • void * • a reference to some random chunk o' memory with untyped/ unknown contents • ⼀一個任意指標,可⽤用來指向任何型別或內容的 記憶體區塊 • id • a reference to some random Objective-C object of unknown class • ⼀一個任意指標,可以指向 Obj-C 中的物件 http://stackoverflow.com/questions/1304176/objective-c-difference-between-id-and-void http://justlink-linus.blogspot.tw/2012/11/id-void-void-pointer.html
  • 38. 補充:Assets資料夾保留字 • Standard Assets • Editor • Plugins • Plugins/x86 • Plugins/Android • Plugins/iOS • Resources http://wiki.unity3d.com/index.php/Special_Folder_Names_in_your_Assets_Folder
  • 39. 想做遊戲? Unity 應⽤用領域 https://www.facebook.com/groups/581769871867384