頂置文

========================= [頂置文開始] =========================
獨立遊戲「蠟筆大冒險」專頁

JJKid 常出沒地點:




========================= [頂置文結束] =========================

2026年1月31日 星期六

Unity 整合 Youtube 功能,筆記 (第二篇)

前言提要

前一篇整合Youtube的筆記說到使用「YoutubeExplode」套件。本來運作都沒問題,用了幾天後發現開始抓不到資料,一直噴 403 Error。

查了一下好像是 Youtube 覺得你是爬蟲所以把你的請求擋下來。

試著在 Request Header 裡補上 Cookie 資訊以及瀏覽器資訊,看能不能繞過 Youtube 的檢查,但是測完都無效,哭啊。

2026年1月27日 星期二

Unity 整合Youtube 功能,筆記

 事前準備

播放 Youtube 要使用到「YoutubeExplode」套件。一般的做法可以到 nuget 網站下載 .nupkg 檔案回來解壓縮 (副檔名改為.zip) 取出我們要的 YoutubeExplode.dll 放進 Unity 的 Plugins/ 資料夾。上述是一般做法,但 YoutubeExplode 依賴了其它 dll,其它 dll 又依賴了更多別的 dll,形成典型的「DLL 依賴地獄(Dependency Hell)」。

2025年7月3日 星期四

Unity Netcode for GameObjects 開發心得筆記

 實作成品,遊戲下載

最近研究了 Unity 提供的多人連線套件 Netcode for GameObjects,簡稱 NGO。用來做一些比較輕量的多人連線應用。我用這個套件做了個五子棋對戰遊戲,可以和遠端的朋友一起玩(你應該有朋友吧?)。只有連線對戰功能,不提供與 AI 對戰。另外遊戲裡沒有擋禁手,就當作休閒遊戲玩玩吧。


這次採用的架構是某一台電腦自己當主機開房間,讓其它玩家連線進來,也就是 Host 的模式。


快樂五子棋遊戲下載連結

2024年4月3日 星期三

使用Unity,在本地端使用 New Input System,讓不同輸入設備分別控制各自的角色

 因為覺得寫流程有點麻煩,這次嘗試著錄影片,但是好像沒有比較快XD。


補充一下影片裡沒有提到的。影片裡示範的情境是電腦裡只有裝一支控制器,所以用 Gamdpad.current 來抓到該設備。如果電腦裡裝著多支手把要怎麼處理?

可以用 Gamepad.all 列出所有控制器設備。

用 Gamepad.all.Count 可以取得清單長度。

用 Gamepad[0] 可以抓到個別的設備。

另外一點是提供給 PlayerInputManager 的 Player Prefab 物件,上面一定要掛 Player Input 這個元件,不然會出錯。


2022年3月26日 星期六

Google Play APP 隱私權政策

 本開發者於Google Play上提供之所有應用程式,均符合以下隱私權政策規範:


當您使用APP功能時,我們將視該服務功能性質,請您提供必要的APP系統權限,並在該特定目的範圍內處理及利用您的個人資料; 本APP不會將個人資料用於其他用途。本人不會於任何伺服器會自行記錄相關行徑,包括您使用連線設備的IP位址、使用時間、使用的瀏覽器、瀏覽及點選資料記錄等。 


本APP其他第三方APP的網路連結或廣告SDK行為,不適用本網站的隱私權保護政策,您必須參考該連結網站中或該廣告公司的隱私權保護政策。 


本APP絕不會提供、交換、出租或出售任何您的個人資料給其他個人、團體、私人企業或公務機關。 


本網站隱私權保護政策將因應需求隨時進行修正,修正後的條款將刊登於網站上。


All apps provided by this developer, on Google Play are subject to the following privacy policy: When you use the APP function, we will regard the nature of the service function, you provide the necessary APP system permissions, and within the scope of the specific purpose of handling and use of your personal information; this APP will not use personal data for other purposes .


I will not automatically record any action on any server, including the IP address of the device you are using, the time of use, the browser you are using, browsing, and clicking on data records. This APP's other third party APP's web link or advertisement SDK's behaviour does not apply to the privacy policy of this site, you must refer to the privacy policy in the link site or of the advertisement company.


 The APP will never provide, exchange, rent or sell any of your personal information to other individuals, groups, private enterprises or public authorities. The privacy policy of this site will be amended at any time in accordance with the needs, the revised terms will be published on the website.

2021年1月1日 星期五

使用Unity,自製小鬧鐘 GG Easy Timer

花了點時間做一個小鬧鐘。對啦,做鬧鐘。對啦,用 Unity。一直以來我都是用一個小軟體叫作 Easy Timer,它提供了自訂鬧鐘功能。那不是重點,覺得 Easy Timer 真正好用之處在於它讓我很容易看到「時間的流逝」,提醒自己專心。

然而之前不曉得怎麼回事,可能水逆吧,鬧鐘變得要響不響的一直出問題,重開機也無效。可是我真的很愛它可以看到時間流逝的功能,那就自己寫一個吧,命名為 GG Easy Timer。

執行檔在此下載


繼續閱讀有開發心得