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
850
Unidux 0.3.1
mattak
1
360
Component Pattern for Android
mattak
0
480
Other Decks in Programming
See All in Programming
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
Contemporary Test Cases
maaretp
0
140
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Jakarta EE meets AI
ivargrimstad
0
600
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Realtime API 入門
riofujimon
0
150
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Side Projects
sachag
452
42k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
4 Signs Your Business is Dying
shpigford
180
21k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
GitHub's CSS Performance
jonrohan
1030
460k
What's in a price? How to price your products and services
michaelherold
243
12k
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ʹΔ
·ͱΊ
使う側が楽になるように配布前に少し⼯夫しよう