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
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Better Code Design in PHP
afilina
PRO
0
120
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Jakarta EE meets AI
ivargrimstad
0
590
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
CSC509 Lecture 09
javiergs
PRO
0
140
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Optimizing for Happiness
mojombo
376
70k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Faster Mobile Websites
deanohume
305
30k
Building Applications with DynamoDB
mza
90
6.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
We Have a Design System, Now What?
morganepeng
50
7.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
How GitHub (no longer) Works
holman
310
140k
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ʹΔ
·ͱΊ
使う側が楽になるように配布前に少し⼯夫しよう