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
770
unitypackage distribution
mattak
January 31, 2018
Tweet
Share
More Decks by mattak
See All by mattak
最近やった作業環境改善施策10個
mattak
0
250
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
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
270
Criando Commits Incríveis no Git
marcelgsantos
2
170
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
190
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
370
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
66
4.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Making the Leap to Tech Lead
cromwellryan
133
9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Done Done
chrislema
181
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
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ʹΔ
·ͱΊ
使う側が楽になるように配布前に少し⼯夫しよう