$30 off During Our Annual Pro Sale. View Details »
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
170
おっさんが停滞しないために
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
860
Unidux 0.3.1
mattak
1
370
Component Pattern for Android
mattak
0
480
Other Decks in Programming
See All in Programming
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
370
Symfony Mapper Component
soyuka
1
160
macOS なしで iOS アプリを開発する(※ただし xxx に限る)
mitsuharu
1
160
かんたんデザイン編集やってみた~「完全に理解した」までの道のり~
morit4ryo
1
110
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
210
気をつけたい!Desktop対応で陥りやすい罠とその対策
goto_tsl
0
170
Jakarta EE meets AI
ivargrimstad
0
490
Missing parts when designing and implementing Android UI
ericksli
0
370
N.E.X.T LEVEL
pluu
2
230
我々のデザインシステムは Chakra v3 にアップデートします
shunya078
2
2.1k
Leverage LLMs in Java with LangChain4j and Quarkus
hollycummins
0
120
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
0
400
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
4
150
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
It's Worth the Effort
3n
183
27k
A Modern Web Designer's Workflow
chriscoyier
693
190k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
How to Ace a Technical Interview
jacobian
276
23k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Practical Orchestrator
shlominoach
186
10k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Designing for humans not robots
tammielis
250
25k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
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ʹΔ
·ͱΊ
使う側が楽になるように配布前に少し⼯夫しよう