1. 程式人生 > >【PS4開發】如何通過unity3d釋出ps4應用

【PS4開發】如何通過unity3d釋出ps4應用

●準備工作

◇和unity對應版本的UnitySetup-Playstation-4-Support-for-Editor-xxxxx.exe,俗稱unity add-on。 ◇能釋出ps4的unity專業版licence
◇索尼ps4 sdk環境
◇索尼ps4開發機/測試機

●環境搭建

◇測試機連線Lan網線、電源、以及通過usb連線ps4手柄,顯示器接HDMI插口,進入ps4系統
◇如果過期需要啟用,每次啟用似乎是6個月的期限,到達6個月要重新啟用,不然安裝的應用進不去(如何啟用見後面
◇更新ps4系統,開啟Neighborhood for ps4,點選System Update選擇.PUP檔案,.PUP檔案在下載的sdk裡

◇安裝完sdk後重啟電腦,在我的電腦側邊欄會有一個欄叫Neighborhood for PlayStation(R)4,選中之後右鍵Add Network Target,確保連線上開發機/測試機(請保證在同一個區域網) ◇如果在Neighborhood for PlayStation(R)4找不到開發機/測試機,則可以進入ps4系統Settings-Debug Settings-Boot Parameters-Release Check Mode看看是不是Development Mode或者Assist Mode

●開始釋出

釋出設定中點選Build And Run即可

●如何啟用PS4

◇開發機
開啟Neighborhood for ps4,點選Active,選擇從索尼官網https://ps4.scedev.net/hardware下載的啟用檔案.afv,進行啟用,也可以直接把.afv檔案拖拽到Neighborhood for ps4 ◇測試機
方法一:
1、開啟ps4測試機,Setting-Debug settings-Boot Parameters-Release Check Mode,調成Assist Mode(協助模式),這樣開啟Neighborhood for ps4就能找到該機器了
2、開啟Neighborhood for ps4,右鍵Add Network Target,新增搜尋到的機器
3、右鍵Activate選中啟用檔案.afv即可啟用

方法二:(U盤等方式,太麻煩不推薦)
1、將下載下來的.afv檔案修改為ps4_activation.afv,拷貝到移動裝置(如u盤)的根目錄
2、插入到ps4測試機usb介面,然後選擇Settings-Debug settings-Activation-Activate from USB

●常見問題

釋出後出現各種shader報錯?
應該是當前sdk太新了,請檢視unity版本所對應的sdk版本是否正確 釋出後報錯:Format of the SELF file is not valid.
This is flagged as an error because you can not submit the sony a package that includes a debug library ... if you are not submitting however it can be safely ignored.
也就是說在unity的Build Setting中將Development build勾去掉即可
PS4開發機報錯:The trail system software is expired
更新最新版的sdk,主機連上電腦,更新System Update file就可以了 釋出後報錯:[Error]Format of the SELF file is not valid. (libSceJobManager_debug.prx, debug/test library libScePerf is linked)
You can remove the extra debug files (in your case libSceFios2_debug.prx and libSceJobManager_debug.prx) in Player Settings->Publishing Settings->Modules->Remove to help avoid those errors and create correctly the master and the submission materials.
釋出後報錯:
Shader error in 'Hidden/Twirt Effect Shader': Program 'vert', Unexpected pipeline: you must set 'stageOptions' and 'stageCount' accordingly (on ps4)

升級unity版本即可。
如何檢視錯誤碼含義?
使用錯誤碼檢視工具:
C:\Program Files (x86)\SCE\ORBIS SDKs\3.000\host_tools\debugging\error_code\ps4_error_code_viewer.exe 如何在ps4開發機登入PSN?
需要海外的線路(可以看Youtube的線路)並且事先將IP追加到索尼白名單裡。 如何設定google client id(PS4分享)
在Google Developers site 註冊 如何測試SHARE功能?
這個國內沒法測的。
你只要高亮遊戲,按Option,選Check,看結果裡面的Google Client ID設定正確就可以了。
如果實在想測,需要海外的線路(可以看Youtube的線路)並且事先將IP追加到索尼白名單裡。
unity釋出到PS4機器上,幀數有幾百幀?並且攝像機有閃屏
是因為垂直同步沒有開啟,在Edit-Project Setting-Quality中,預設是Fastest,這個沒有開啟垂直同步,預設修改為Good即可解決。