顯示具有 unity3d 標籤的文章。 顯示所有文章
顯示具有 unity3d 標籤的文章。 顯示所有文章

2015年10月9日 星期五

Develop VR App by Unity3D

前言:因為公司買了一些VR的設備,藉由之前用Unity開發遊戲的經驗,剛好替公司破億下載的派對做一個派對限定的APP。

Unity3D在5.1版後正式支援VR功能,而最近各個VR的平台紛紛做好Unity3D的Plugin,讓開發者能夠專心在處理想要呈現的世界,像Google Cardboard的在這,以及Samsung GearVR的在這,概念大概是把攝影機的Prefab拉到Unity的編輯世界裡就完成了,不過每家VR也有些特殊的功能通常也會提供,像Google Cardboard右邊有個拉環可以拉,它的SDK也包含這個觸發的Prefab。

Google Cardboard可以把程式甚至Deploy到iPhone上,用Cardboard就能得到跟Android一樣的體驗,只能說Google的想法真的很特別(民主);不像Oculus只想著如何綁硬體來賣,雖然用Unity開發,但只有Android而且還要Samsung S6跟Note4才能讓程式跑起來。

最後分享一下我的成品,概念是會把派對時,把大家拍的照片放在一個類似五次元的空間中(靈感來自星際效應的最後片段)。

https://github.com/bearprada/PicCollage100MPartyVRApp


2013年2月22日 星期五

The Customized Android Activity on Unity3D

   The Unity3D is not accept you to change the launch flow.but some time we need to insert the special flowchart( for example : login, play the opening video, native menu...etc). So it's not a function in current version(4.5.6). but we still can finish it.

In Android, we can insert the special Activity to be launch point. and launch the Unity activity later. the principle is that, when you put the Manifest in project folder(Assets/Plugin/Android/), the release will use it. you should put res/ and assets/ too. finally the src/ should compile to jar file, and put it in bin/.

//TODO add source code

The iOS solution will discuss later.

Reference : 

http://lancelotdiary.blogspot.tw/2012/05/unity3d-plug-in-for-android-activity.html
http://randomactsofdev.wordpress.com/2011/08/19/accessing-the-android-compass-through-unity-3d/


2013年1月28日 星期一

9-patch in Unity3D

   Unity3D上開發GUI程式在3.5.6版比較推薦NGUI這套系統(雖然還是很多BUG),不過據說在4.x之後就會有官方support的版本。今天碰到一個節省GUI資源的問題,在Android上有9-patch能節省GUI所花費記憶體的大小,但NGUI的Altas似乎沒辦法看懂它,但NGUI提供另外一套類9-patch的解法。用Sliced Sprite搭配Altas內的圖片增加Board的寬度即可以達成。