Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
unitypackage distribution
Search
mattak
January 31, 2018
Programming
0
760
unitypackage distribution
mattak
January 31, 2018
Tweet
Share
More Decks by mattak
See All by mattak
最近やった作業環境改善施策10個
mattak
0
240
UnixTime is Simple
mattak
0
160
おっさんが停滞しないために
mattak
32
18k
tech invest
mattak
1
300
Nodux - node base redux framework
mattak
0
1.4k
what_is_technical_investment
mattak
0
120
Unity energy usage
mattak
0
840
Unidux 0.3.1
mattak
1
360
Component Pattern for Android
mattak
0
480
Other Decks in Programming
See All in Programming
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
2.7k
Honoの来た道とこれから
yusukebe
19
3k
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
970
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
150
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
430
Android 15 でアクションバー表示時にステータスバーが白くなってしまう問題
tonionagauzzi
0
140
Nuxtベースの「WXT」でChrome拡張を作成する | Vue Fes 2024 ランチセッション
moshi1121
1
510
Server Driven Compose With Firebase
skydoves
0
400
[PyCon Korea 2024 Keynote] 커뮤니티와 파이썬, 그리고 우리
beomi
0
110
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Thoughts on Productivity
jonyablonski
67
4.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
4 Signs Your Business is Dying
shpigford
180
21k
Producing Creativity
orderedlist
PRO
341
39k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
14
1.9k
Happy Clients
brianwarren
97
6.7k
Become a Pro
speakerdeck
PRO
24
5k
Git: the NoSQL Database
bkeepers
PRO
425
64k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Transcript
VOJUZQBDLBHF࡞Δͱ͖ʹ ؾΛ͚ͭͨ΄͏͕͍͍͜ͱ (PUBOEBVOJUZ !NBUUBL !
VOJUZQBDLBHF
.unitypackage Ͱऴྃ͢ΔAssetܗࣜ
1. ~.unitypackage ΛμϒϧΫϦοΫ 2. ཉ͍͠ͷ͚ͩࢦఆͯ͠import
༨ஊ
$ cp Unicache-v0.2.0.unitypackage Unicache-v0.2.0.tar.gz $ tar -zxvf Unicache-v0.2.0.tar.gz ֦ுࢠΛ .unitypackage
=> .tar.gz ʹ͢Δͱத͕ݟΕΔ
None
/:guid - assetͷguid͕ϑΥϧμ໊ʹ /:guid/pathname - pathnameʹอଘઌͷpath - ྫ: Assets/Plugins/UniRx/Scripts/UnityEngineBridge/TypedMonoBehaviour.cs /:guid/asset
- assetͷத (ͦͷ·Μ·ϑΝΠϧ͕ೖͬͯΔ) /:guid/asset.meta - assetͷϝλσʔλ (ͦͷ··) جຊతʹguidͰϑΝΠϧཧ => ϑΝΠϧҠಈͯ͠guidมΘΒͳ͚Εimportඞཁ͔Ͳ͏͔ݕՄೳ
ؾΛ͚ͭͨ΄͏͕ ͍͍͜ͱ
Ϋϥε໊ඃΓ
ྫ: The namespace `global::' already contains a definition for `Singleton'
ಉ͡Ϋϥε໊͕ෳ͋ΔͱίϯύΠϧͰ͖ͳ͍ͷͰࠔΔ Plugins/Asset1/Singleton.cs Plugins/Asset2/Singleton.cs public class Singleton {}
ରॲ namespaceをつけよう namespace MyLib { public class Singleton {} }
ͱͯجຊ͚ͩͲɺΒͳ͍··͍ͯ͠Δͷଟ͍ҹ
ଞͷϥΠϒϥϦΛ ϦωʔϜͯ͠ར༻
Plugins/Asset1/MiniJSON.cs Plugins/Asset2/MiniJSON.cs ࠔΔ͜ͱͳ͍͕ɺಉ͡ίʔυ͕ෳόΠφϦʹؚ·Εͯແବ. ྫ: namespace Asset1 { public static class
Json {} } namespace Asset2 { public static class Json {} }
ରॲ 外部ライブラリは名前を変えずに外に置こう Asset1 - Assets/Plugins/Asset1/* - Assets/Plugins/Asset2/* - Assets/Plugins/MiniJSON/MiniJSON.cs ڞ௨ͷॴʹ͓͍͍ͯΕɺ
2ͭҎ߱ͷϥΠϒϥϦΛimport͢Δࡍʹڞ௨ͷϦιʔεΛແࢹͰ͖Δ namespace MiniJSON { public static class Json {} }
Plugins/MyLib/* ֎෦ϥΠϒϥϦ͕ࣗͷAssetσΟϨΫτϦ (Plugins/MyLib/) ʹଘࡏ ୳ͨ͠Γআ֎அΛ͢Δͷ͕໘ʹͳΔ ྫ: Plugins/MyLib/A/B/C/MiniJSON/MiniJSON.cs
ରॲ 外部ライブラリは⾃分のAssetのフォルダ外に置こう Asset1 - Assets/Plugins/Asset1/* - Assets/Plugins/MiniJSON/MiniJSON.cs ڞ௨ͷॴʹ͓͍͍ͯΕɺ 2ͭҎ߱ͷϥΠϒϥϦΛimport͢Δࡍʹڞ௨ͷϦιʔεΛແࢹͰ͖Δ Asset2
- Assets/Plugins/Asset2/* - Assets/Plugins/MiniJSON/MiniJSON.cs
ίϯύΠϧ͕͍
Assets/MyLib/Somthing1.cs Assets/MyLib/Somthing2.cs Assets/MyLib/Somthing3.cs PluginsҎԼʹϥΠϒϥϦͱͯ͠ͷίʔυΛஔ͔ͳ͍ύλʔϯ Script͕૿͍͑ͯ͘ͱɺίϯύΠϧ͕͘ͳ͍ͬͯ͘ ྫ: ͜ͷͪ ͕͍
ରॲ 変更しないコードはPlugins/ に置こう Assets/MyLib => Assets/Plugins/MyLib Plugins/ ϓϦίϯύΠϧͯ͘͠ΕΔ. PluginsҎԼͷίʔυʹมߋ͕ͳ͍ݶΓ࠶ίϯύΠϧΒͳ͍. ϥΠϒϥϦͳͲมߋ͕ͳ͍ίʔυ
Plugins/ ҎԼ (ϓϩδΣΫτͰɺ։ൃதͷίϯύΠϧ͕ͪʹͳΓ·ͨ͠)
&YBNQMFT 5FTU ͷॴ͕Θ͔Γʹ͍͘
Assets/Plugins/MyLib/Hoge.cs Assets/Plugins/MyLib/README.md Assets/Plugins/MyLib/Sample1/Sample2.cs Assets/Plugins/MyLib/Sample2/Sample1.cs Assets/Plugins/MyLib/Editor/Test/HogeTest.cs - (ϥΠϒϥϦͱͯ͠ͷ) ࠷ݶιʔε - Example
- Test - Document ͜ΕΒͷ۠Γ͕Θ͔Γʹ͘͘ͳ͍ͬͯΔ ͲΕΛimport͢Δ͖͔ɺਂ͍֊·Ͱݟͳ͍ͱΘ͔Βͳ͍ͳͲ ྫ:
ରॲ 配下はトップレベルで不要・必要を分別できるようにしよう Assets/Plugins/MyLib/Core/* Assets/Plugins/MyLib/Examples/* Assets/Plugins/MyLib/Documents/* Assets/Plugins/MyLib/Tests/Editor/* MyLibҎԼͷҰ൪্ͷ֊ͷνΣοΫϘοΫεͰෆཁඞཁ͕அͰ͖Δ ॴ͕ࡏ͠ͳ͍ͷͰΘ͔Γ͍͢͠ɺআ/Ճ͍͢͠
ফͤͳ͘ͳΔ
͜ΕɺͲͷAssetͰ͔ͭͬͯͨjar͚ͩͬʁΈ͍ͨͳঢ়گʹͳ͍ͬͯ͘… ྫ: Assets/Plugins/Android/okhttp-3.8.0.jar Assets/Plugins/Android/okio-3.8.0.jar
ରॲ どのライブラリで必要なファイルかdirectoryで判別可能にしよう Assets/Plugins/Android/MyLib/okhttp-3.8.0.jar Assets/Plugins/Android/MyLib/okio-3.8.0.jar ຊɺґଘؔΛهड़Ͱ͖ΔԿ͔Ͱཧ͢Δͷ͕ྑͦ͞͏ ґଘϑΝΠϧ͚ͩهड़͓͍ͯͯ͠ɺಈతʹऔಘ͢Δͱ͔͕ϕετͳؾ͕͢Δ
όʔδϣϯ͔Β ͳ͍
ରॲ VERSION.txt 置こう $ cat Assets/Plugins/Zenject/Version.txt 5.4.0 γϯϓϧ͚ͩͲɺόʔδϣϯ͕มΘͬͨ͜ͱΛ໌ࣔͰ͖ͯྑ͍ gitʹΔ
·ͱΊ
使う側が楽になるように配布前に少し⼯夫しよう