アセット運用ベストプラクティス

3865d333f9dc02cd417575c2cfa1606f?s=47 unitydojo
August 23, 2016

 アセット運用ベストプラクティス

Unity道場第十回目「アセット運用ベストプラクティス」のスライドです。
http://eventdots.jp/event/596059

3865d333f9dc02cd417575c2cfa1606f?s=128

unitydojo

August 23, 2016
Tweet

Transcript

  1. 6OJUZ麣㜥
 "TTFU麊欽كأز٥فؙٓذ؍أ

  2. ࣗݾ঺հ 㿊募麦䕕 ِصذ؍٥ذؙظٗآ٦ؤ٥آٍػٝ ؿ؍٦ٕسؒٝآص،Ⱟ
 ؒٞ؋ٝآؑٔأز

  3. #Unityಓ৔

  4. 6OJUZד،إحز׾ⵃ欽ׅ׷ 㛇燉

  5. Ξηοτ(Asset) = ࢿ࢈ ΦʔσΟΦɺςΫενϟɺϞσϧɺΞχϝʔγϣϯ ࣭ײɺεΫϦϓτɺͦͷଞॾʑ

  6. ͱΓ͋͑ͣֆΛग़͢ɺUnityॳ৺ऀ޲͚આ໌ɻ • 6OJUZؒر؍ةך1SPKFDUؽُ٦ח
 ،إحز׾سٓحؚسٗحف
 • ӴӴ؝ٝه٦طٝزךӛӛח
 سٓحؚسٗحف
 • 邌爙ׁ׸׋٧ ӟs

    
  7. None
  8. Unityͷಈ࡞ͷʮॳ৺ऀ޲͚ͷઆ໌ʯ • 6OJUZؒر؍ةך1SPKFDUؽُ٦ח
 ،إحز׾سٓحؚسٗحف
 • ӴӴ؝ٝه٦طٝزךӛӛח
 سٓحؚسٗحف
 • 邌爙ׁ׸׋٧ ӟs

     • ،إحز׾؎ٝه٦ز׃ג
 ⢪ִ׷䕎ח㢌䳔
 • ء٦ٝח،إحز׾ⵃ欽ׅ׷
 ؝ٝه٦طٝز堣腉׾欽䠐 • ؒر؍ةד؝ٝه٦طٝزח
 ،إحز׾鏣㹀
 • 邌爙ׁ׸׋٧ ӟs 
  9. Unityͷಈ࡞ͷʮॳ৺ऀ޲͚ͷઆ໌ʯ • 6OJUZؒر؍ةך1SPKFDUؽُ٦ח
 ،إحز׾سٓحؚسٗحف
 • ӴӴ؝ٝه٦طٝزךӛӛח
 سٓحؚسٗحف
 • 邌爙ׁ׸׋٧ ӟs

     • ،إحز׾؎ٝه٦ز׃ג
 ⢪ִ׷䕎ח㢌䳔
 • ء٦ٝח،إحز׾ⵃ欽ׅ׷
 ؝ٝه٦طٝز堣腉׾欽䠐 • ؒر؍ةד؝ٝه٦طٝزח
 ،إحز׾鏣㹀
 • 邌爙ׁ׸׋٧ ӟs 
  10. ಈతʹࠩ͠ସ͑ΒΕΔResources • 3FTPVSDFTؿٕؓت⟃♴חꂁ縧׃׋
 ،إحز׾ծأؙٔفزַ׵《䖤ׅ׷ • ؿ؋؎ٕせ䭁䓸㶨כ搀׃ד《䖤 • ٔٔ٦أ䖓ח㢌刿⳿勻זְ

  11. ϦϦʔεޙʹมߋग़དྷΔAssetBundle • ٔٔ٦أ幥ך،فٔח،إحز׾鷄⸇ • BTTFU纇׾䎗אַ勲י׋ CVOEMF ׮ך • 3FTPVSDFTהずׄ״ֲח،إحز׾铣׭׷

  12. ͦͷଞɻ • +1&(װ1/(ծ#.1瘝ך歗⫷ծ
 8"7װ.1瘝ך،إحزה׃ג涫ꐮ׃ג ְזְٔا٦أ׾⹛涸חٗ٦سׅ׷կ • ذؗأز׾湫䱸ٗ٦س׃גծ
 㢌䳔׃ג✺ղׅ׷կ

  13. ׮ֲ㼰׃鑫׃ֻկ

  14. ΞηοτͷΠϯϙʔτ • "TTFUTؿٕؓت⟃♴חؿ؋؎ٕ׾ꂁ縧׃
 ،إحز׾؎ٝه٦زׅ׷կ • ؎ٝه٦ز׃׋،إحزכծ
 ぐفٓحزؿؓ٦يד铣׭׷ر٦ةח
 㢌䳔ծ؜٦يד⢪ִ׷״ֲחז׷կ • ؎ٝه٦ز׃׋،إحزכ4DFOFװ


    1SFGBCח涫ꐮ⳿勻׷״ֲחז׷կ
  15. γʔϯϏϡʔʹΞηοτΛઃఆ͢Δɺͱ͸ • 4DFOFؿ؋؎ٕח؝ٝه٦طٝز׾
 鏣㹀׃ծ،إحزפך⿫撑׾涫ꐮׅ׷կ • 䞔㜠כ4DFOFח⥂㶷ׁ׸ծ4DFOF׾
 ٗ٦س׃׋ꥷח،إحز׮荈⹛涸ח
 ٗ٦سׁ׸׷կ • 1SPKFDUؽُ٦ַ׵%%דؔـآؙؑز׮⡲䧭

    ׁ׸׷،إحز׮֮׷4QSJUF瘝 • ؒر؍ةחג✲⵸חء٦ٝח涫ꐮׅ׷կ
  16. ResourcesͰϩʔυ͢Δɺͱ͸ • 㹋遤儗ח3FTPVSDFTؿٕؓتפせ⵸׾欽ְג،ؙإأ׃ծ،إحز׾《䖤ׅ׷կ
 • 《䖤׃׋ⰻ㺁׾أؙٔفزחג
 ؝ٝه٦طٝزח鏣㹀ׅ׷կ • 《䖤⳿勻׷ךכ3FTPVSDFTؿٕؓت⟃♴ח
 ろ׭׋،إحزך׫կ •

    ٔٔ٦أ䖓ח䊴׃剏ִ׷✲ָדֹזְ
  17. None
  18. None
  19. None
  20. None
  21. AssetBundle͔Βऔಘ͢Δɺͱ͸ • 6OJUZָ⢪欽〳腉ז،إحز׾
 ♧א⟃♳呓秛ׅ׷،٦ؕ؎ـ • ٔٔ٦أ䖓ח،إحزך鷄⸇٥䊴剏ָ〳腉דծ㹋遤儗ח،إحز׾ٗ٦س׃ג⢪ֲկ • "TTFU#VOEMFず㡦ך⣛㶷ꟼ⤘׾邌爙ׅ׷.BOJGFTU
 "TTFU#VOEMFח،إحز׾呓秛ׅ׷"TTFU"TTFUCVOEMF
 "TTFU#VOEMFחء٦ٝ׾呓秛ׅ׷4USFBNFE4DFOF"TTFU#VOEMFָ֮׷կ


  22. None
  23. None
  24. None
  25. None
  26. None
  27. StreamedSceneAssetBundle • 4USFBNFE4DFOF"TTFU#VOEMF
 "TTFU#VOEMFחء٦ٝ׾呓秛׃ծ
 4DFOF.BOBHFSַ׵ㄎן⳿ׇ׷կ • "TTFU#VOEMFחכء٦ٝ䞔㜠הծ
 ء٦ָٝ⿫撑ׅ׷،إحز纇ָろת׸׷կ

  28. None
  29. None
  30. None
  31. Assetͷґଘؔ܎ "TTFU#VOEMFַ׵،إحز׾《䖤ׅ׷ꥷծ
 ⿫撑⯓ך"TTFU#VOEMFָٗ٦سׁ׸גְ׸ל
 ➭ך"TTFU#VOEMFָ䭯א،إحز׾ٗ٦س׃גֻ׸׷կ JDPO"# QSFGBC"#

  32. AssetBundle Manager • AssetBundleͷ্ҐϨΠϠʔʢ༧ఆ • AssetBundle͔Β
 μ΢ϯϩʔυग़དྷΔ

  33. AssetBundle Manager • AssetBundleΛϏϧυͤͣAssetBundle͔Β
 ΞηοτΛऔಘ͢ΔγϛϡϨʔλʔػೳ • ϩʔΧϧαʔόʔΛߏங͢ΔLocal Serverػೳ • ίʔυΛॻ͔ͣAssetBundleΛϏϧυ͢ΔBuildػೳ

  34. ،إحز麊欽كأز٥فؙٓذ؍أ

  35. ך⵸ח˘

  36. كأز٥فؙٓذ؍أ
 剑黝鍑

  37. 剑黝鍑כ朐屣ח״׏ג殯ז׷

  38. Ⰻגכزٖ٦سؔؿ

  39. 剑黝鍑׾濼׷捀חכծ
 ٕ٦ٕה鼅䫛肇׾䪾䳢ׅ׷կ

  40. 姻׃ְ鼅䫛肇׾䖤׷捀ח

  41. ׮׏ה׮׏ה鑫׃ֻկ

  42. ،إحزהؔـآؙؑزך
 ءٔ،ٓ؎ؤחאְג

  43. γϦΞϥΠζɺͱ͸ • ؔـآؙؑزך朐䡾׾⥂㶷ծ
 鷞חؔـآؙؑزח䗁⯋〳腉חׅ׷կ • 6OJUZכ،إحزך麊欽ך㣐鿇ⴓ׾
 ֿךءٔ،ٓ؎ؤ䪮遭ח⣛㶷׃גְ׷կ

  44. ྫ͑͹PrefabͱSceneͷؔ܎ 圓鸡׾⥂㶷

  45. ،إحز QSFGBCװTDFOF ྫ͑͹ΦϒδΣΫτͱΞηοτͷؔ܎ ⿫撑䞔㜠׾⥂㶷

  46. PrefabΛγϦΞϥΠζ ،إحزפך⿫撑 ،إٝـٔפך⿫撑 㶨QSFGBC ⽃♧ך
 ءٔ،ٓ؎ؤ׃׋ر٦ة

  47. PrefabΛσγϦΞϥΠζ ،إحزפך⿫撑 ،إٝـٔפך⿫撑 㶨QSFGBC 醱꧟זؔـآؙؑز圓鸡

  48. ΞηοτΠϯϙʔτॲཧ΋ɻ • Texture΍AudioɺModel౳ωΠςΟϒσʔλΛࢀর͢Δ
 UnityEngine.ObjectΛγϦΞϥΠζʢʹΠϯϙʔτʣ

  49. ωΠςΟϒσʔλʁ ع٦سؐؑ،ח״׏גؿؓ٦وحزָ
 寸㹀׃גְ׷暟կ 䭷㹀ךؿؓ٦وحزדזְהծ
 ⵃ欽ׅ׷✲ָדֹזְ ⢽ִלQWSUDծFUD瘝ךذؙأثٍر٦ة
 PHHծNQ瘝ךؔ٦ر؍ؔر٦ةկ ؿؓ٦وحزכفٓحزؿؓ٦يח⣛㶷ׅ׷ךדծ
 ؙٙٝحءّٝ縧ְկ

  50. ΞηοτΠϯϙʔτॲཧ΋ɻ • Texture΍AudioɺModel౳ωΠςΟϒσʔλΛࢀর͢Δ
 UnityEngine.ObjectΛγϦΞϥΠζʢʹΠϯϙʔτʣ
 • UnityEngine.ObjectΛܦ༝ͯ͠ɺScene΍Prefab͔Β
 ωΠςΟϒσʔλ΁ؒ઀తʹΞΫηεՄೳʹ͢Δɻ

  51. 6OJUZ&OHJOF0CKFDU UFYUVSF ،إحز ،إحزהر٦ةכ Πϯϙʔτ

  52. 6OJUZ&OHJOF0CKFDU
 ،إحز UFYUVSF QSFGBCװTDFOF ط؎ذ؍ـ
 ر٦ة ءٔ،ٓ؎ؤ
 朐䡾׾⥂㶷ⱄ植〳腉ח

  53. 6OJUZ&OHJOF0CKFDU UFYUVSF QSFGBCװTDFOF (6*%-PDBM*%
 穗歋ד،ؙإأ NFUB ࢀরͷྲྀΕʢΤσΟλʣ

  54. GUID? 6OJUZכ،إحز׾陎ⴽׅ׷ꥷծ
 ꅾ醱׃זְ*%(6*%ד،إحز׾
 陎ⴽ׃גְ׷կ (6*%כ؎ٝه٦ز儗ח鏣㹀ׁ׸ծ
 NFUBر٦ةָ㣟׻׸זְꣲ׶ծ笝䭯ׁ׸׷ ػأװؿ؋؎ٕせָ㢌⻉׃ג׮
 ⿫撑ָ㢩׸זְ捀ך倵瘻

  55. .meta? ،إحز׾؎ٝه٦ز儗ח⡲䧭ׁ׸׷
 ،إحزせ NFUBךؿ؋؎ٕկ ،إحزהずػأח⡲䧭ׁ׸׷կ NFUB׾婍׃׋תתؿ؋؎ٕ׾
 ♳剅ֹׅ׷✲דծ⿫撑װ鏣㹀׾笝䭯׃׋תת ،إحز׾刿倜⳿勻׷կ ⴱ劍鏣㹀כꦀ׃ؿ؋؎ٕחז׏גְ׷կ

  56. Local ID? 4QSJUFװ.PEFM瘝ծ،إحزכⰻ鿇ח
 醱侧ך،إحز׾䭯א✲ָ֮׷կ ׉ְֲ׏׋،إحز纇כծ(6*%הכⴽח
 -PDBM*%חג陎ⴽׅ׷կ NFUBח鎸鶢ׁ׸גְ׷
 ך䖓ך侧㶵ָ-PDBM*%

  57. ͦͷଞɺGUIDΛׂΓ౰ͯΒΕΔΞηοτ • ScriptableObject
 ʢಠࣗͷσʔλܕΛఆٛ͢ΔͨΊͷϑΥʔϚοτɻ
 ɹUnityΤϯδϯ͕γϦΞϥΠζ/σγϦΞϥΠζ͢Δʣ • Monobehaviour
 ʢಛఆͷΞηϯϒϦͷ໊લۭؒ.Ϋϥε΁ͷࢀরΛอ࣋͢Δ)

  58. את׶ծ

  59. את׶ծ6OJUZ&OHJOF0CKFDUדٓحؾؚٝ׃ծ
 ⿫撑ꟼ⤘׾⚵׀ה⥂㶷׃גְ׷կ

  60. ،إحزխխխխխכ⡦儗ٗ٦سׁ׸׷ך ط؎ذ؍ـر٦ة فٖعـ

  61. ΞηοτͷϥΠϑαΠΫϧ • ωΠςΟϒσʔλ͸UnityEngine.ObjectΛ
 ܦ༝ͯ͠ϩʔυ͞ΕΔɻ • ࣮ߦ࣌͸ɺGUIDͱLocal IDΛม׵ͨ͠Instance IDͰ
 ΞηοτΛࢀর͢Δʢߴ଎Խͷҝʣ •

    ෆཁʹͳͬͨΒΞϯϩʔυ͢ΔɻInstance ID͸࢒Δ
  62. 6OJUZ&OHJOF0CKFDU QSFGBCװTDFOF *OTUBODF*%׾ؒٝآٝח涫ꐮ ΞηοτͷϥΠϑαΠΫϧ

  63. 6OJUZ&OHJOF0CKFDU QSFGBCװTDFOF *OTUBODF*%穗歋ד
 ،ؙإأ ΞηοτͷϥΠϑαΠΫϧ

  64. 6OJUZ&OHJOF0CKFDU UFYUVSF QSFGBCװTDFOF ذؙأثٍ׾ٗ٦س ΞηοτͷϥΠϑαΠΫϧ

  65. 6OJUZ&OHJOF0CKFDU UFYUVSF QSFGBCװTDFOF ⿫撑⯋׾搀ֻׅ ΞηοτͷϥΠϑαΠΫϧ

  66. 6OJUZ&OHJOF0CKFDU UFYUVSF ذؙأثٍ׾،ٝٗ٦س
 *OTUBODF*%כ婍׷ ΞηοτͷϥΠϑαΠΫϧ

  67. ΞηοτΛϩʔυ͢ΔγφϦΦ • Instance ID͕ࢀর͞ΕΔʢSceneɾPrefab౳͔Βʣ • AssetBundle.Load΍Resources.Load౳͔ΒͷΞΫηε

  68. ΞηοτΛΞϯϩʔυ͢ΔγφϦΦ • Resources.UnloadAssets • Resources.UnloadUnusedAssets • AssetBundle.Unload(true) • SceneManager.LoadScene(LoadSceneMode.Single)

  69. Ξϯϩʔυग़དྷͳ͍έʔε 稢ְַ眔㔲ד،إحز׾⵴ꤐ⳿勻׷6OMPBE"TTFUTװ "TTFU#VOEMF6OMPBE USVF כ*OTUBODF 醱醡ׁ׸׋ ،إحزװؔـآؙؑز׾嶊ׇזְկ %FTUSPZד嶊ַׅծ-PBE4DFOFד⚵׀ה
 ء٦ٝ׾װ׶湫ׅկ

  70. 3FTPVSDFTחאְג

  71. Resourcesͷಛ௃ • ςΩετϕʔεͰInstance IDʹΞΫηε • ೚ҙͷΞηοτΛҾ͖ग़ͤΔ • ResourcesϑΥϧμҎԼʹ഑ஔͨ͠ΞηοτΛొ࿥

  72. Resourcesͷ಺෦ಈ࡞ • ،فٔ饯⹛儗חⴱ劍⻉Ⳣ椚ָ饥׶ծ
 *OTUBODF*%הؿ؋؎ٕせהؿٕؓتػأ ׾ٍؗحءُׅ׷կ • ،فٔ饯⹛儗ծ俑㶵⴨،ؙإأך捀ך
 ٕحؙ،حفذ٦ـٕ׾⡲׷կ • ⽃♧ךؿ؋؎ٕחءٔ،ٓ؎ؤׁ׸׷կ

  73. 3FTPVSDFT 3FTPVSDFTQSFGBC "TTFU NBUFSJBM "TTFU UFYUVSF "TTFU BOJNBUJPO 3FTPVSDFTQSFGBC "TTFU

    NBUFSJBM "TTFU UFYUVSF
  74. ResourcesͷσϝϦοτ • ResourcesϑΥϧμΛෆద੾ʹ࢖͏ͱɺ
 ΞϓϦͷىಈ࣌ؒ΍Ϗϧυ͕࣌ؒ৳ͼΔ • ΞηοτΛ௥Ճग़དྷͳ͍ҝɺΧελϜίϯςϯπΛ഑৴ग़དྷͳ͍ • ࠩ෼ߋ৽͕ग़དྷͳ͍ • Ξηοτ͸ѹॖ͞Εͳ͍

    • Android͸ΞΫηεʹ௥Ճίετ͕ൃੜ͢Δ
  75. ResourcesϑΥϧμΛෆద੾ʹ࢖͏ 3FTPVSDFTؿٕؓت⟃♴חⰋגך،إحز׾ 縧ֻהծ花㣐זⴱ劍⻉Ⳣ椚ָ涪欰ׅ׷կ ،إحزך侧ח䘔ׄג
 ٕحؙ،حفذ٦ـٕ׮䎢ָ׷
 /MPH/ ד

  76. "TTFU#VOEMFחאְג

  77. AssetBundleͷಈ࡞ • "TTFU#VOEMF׾ٗ٦سׅ׷הծ "TTFU#VOEMFⰻחろת׸׷،إحزך *OTUBODF*%ָ铣׫鴥ת׸׷կ • "TTFU#VOEMF׾騖ְ׌⣛㶷ꟼ⤘׾
 鏣㹀ׅ׷✲ָ⳿勻׷կ • "TTFU#VOEMFך䭯אط؎ذ؍ـر٦ةפ


    *OTUBODF*%׾穗歋׃ג،ؙإأ "QQ "TTFU#VOEMF JOTUBODF*%T
 姻然חכ*OTUBODF*%׾⡲׷暟 /BUJWF%BUB 0CKFDUT
  78. AssetBundleͷಈ࡞ • "TTFU#VOEMF׾ٗ٦سׅ׷הծ "TTFU#VOEMFⰻחろת׸׷،إحزך *OTUBODF*%ָ铣׫鴥ת׸׷կ • "TTFU#VOEMF׾騖ְ׌⣛㶷ꟼ⤘׾
 鏣㹀ׅ׷✲ָ⳿勻׷կ • "TTFU#VOEMF׾6OMPBEׅ׷הծ


    *OTUBODF*%ָ㣟׻׸׷կ • 3FTPVSDFTהず圫ծ湫䱸⿫撑׃גְ׷، إحزך侧ח״׶ծ俑㶵،ؙإأ欽ך
 ٕحؙ،حفذ٦ـָٕ䎢ָ׷կ • "TTFU#VOEMF㔐חאֹ։LCך
 ًٌٔ嶊顤ה⫦ַזָ׵㾜Ꟛך
 ؔ٦غ٦قحسָ֮׷
  79. AssetBundleͷಈ࡞ • "TTFU#VOEMF׾ٗ٦سׅ׷הծ "TTFU#VOEMFⰻחろת׸׷،إحزך *OTUBODF*%ָ铣׫鴥ת׸׷կ • "TTFU#VOEMF׾騖ְ׌⣛㶷ꟼ⤘׾
 鏣㹀ׅ׷✲ָ⳿勻׷կ • "TTFU#VOEMF׾6OMPBEׅ׷הծ


    *OTUBODF*%ָ㣟׻׸׷կ • 3FTPVSDFTהず圫ծ湫䱸⿫撑׃גְ׷، إحزך侧ח״׶ծ俑㶵،ؙإأ欽ך
 ٕحؙ،حفذ٦ـָٕ䎢ָ׷կ • "TTFU#VOEMF㔐חאֹ։LCך
 ًٌٔ嶊顤ה⫦ַזָ׵㾜Ꟛך
 ؔ٦غ٦قحسָ֮׷
  80. AssetBundleͷґଘؔ܎ ➭ך"TTFU#VOEMFח⣛㶷׃גְ׷㜥さծ
 *OTUBODF*%׾⯋ח⿫撑׾鍑寸ׅ׷կ ⣛㶷⯓ך*OTUBODF*%ָ鋅אַ׵זְ㜥さծ
 .JTTJOHח鏣㹀ׁ׸׷կ NJTTJOH䖓ד׮*OTUBODF*%ָ鍑寸ׁ׸׸ל
 ⣛㶷ꟼ⤘כ䗁崞ׅ׷կ

  81. None
  82. None
  83. None
  84. AssetBundleͷґଘؔ܎ "TTFU#VOEMF׾6OMPBEׅ׷הծ*OTUBODF*% ׾1FSTJTUFOU.BOBHFSַ׵《׶♴־׷կ ♧䏝《׶♴־׋*OTUBODF*%כ䗁崞⳿勻׆ծ ⱄٗ٦س儗ח倜׃ְ*OTUBODF*%ָⶴ׶䮶׵ ׸׷կ ⿫撑⯓׾6OMPBE׃׋㜥さծ⿫撑⯋׮6OMPBE ׃ⱄ䏝-PBEׅ׷䗳銲ָ֮׷կ

  85. None
  86. None
  87. None
  88. None
  89. AssetBundle.Unload "TTFU#VOEMF6OMPBE USVF  "TTFU#VOEMFַ׵䲿⣘׃׋Ⰻגך
 *OTUBODF*%׾䭯א،إحز׾䓼ⵖ涸ח
 Ꟛ佝׃ծ*OTUBODF*%׮⵴ꤐׅ׷կ "TTFU#VOEMF6OMPBE GBMTF 

    "TTFU#VOEMFַ׵䲿⣘׃׋*OTUBODF*%
 ׾⵴ꤐׅ׷կ
  90. AssetBundleͷಈ࡞ • "TTFU#VOEMF׾ٗ٦سׅ׷הծ "TTFU#VOEMFⰻחろת׸׷،إحزך *OTUBODF*%ָ铣׫鴥ת׸׷կ • "TTFU#VOEMF׾騖ְ׌⣛㶷ꟼ⤘׾
 鏣㹀ׅ׷✲ָ⳿勻׷կ • "TTFU#VOEMF׾6OMPBEׅ׷הծ


    *OTUBODF*%ָ㣟׻׸׷կ • 3FTPVSDFTהず圫ծ湫䱸⿫撑׃גְ׷، إحزך侧ח״׶ծ俑㶵،ؙإأ欽ך
 ٕحؙ،حفذ٦ـָٕ䎢ָ׷կ • "TTFU#VOEMF㔐חאֹ։LCך
 ًٌٔ嶊顤ה⫦ַזָ׵㾜Ꟛך
 ؔ٦غ٦قحسָ֮׷
  91. AssetBundleͷ෼ׂ਺ -;."ך㜥さծ؟؎ؤָ㣐ְֹהꬊ䌢ח
 ꞿְٗ٦ر؍ؚٝ儗꟦ָ涪欰ׅ׷կ $BDIF0S%PXOMPBEךٍؗحءُ׾ⵃ欽ׅ׷✲ ד넝鸞דٗ٦سָ〳腉חז׷ָծ
 侧ָ㢳ֺׅ׷ה饯⹛儗ח頾蚚חז׷կ -PBE"MM"TTFUTכך،إحز׾♧䭍ד铣׬ז ׵לծ鷵如ٗ٦س״׶׮傍ְַ׮׃׸זְկ

  92. AssetBundleͷ෼ׂ਺ "TTFU#VOEMFך侧ָ㼰זְ • ًٌٔ⢪欽ꆀָ㟓ִ׷
  NFNPSZ瘝ד铣׬ה • 铣鴥儗꟦ָ⠼ן׷
  M[NBד铣׬ה

    • "TTFU#VOEMFךؽٕس儗ծ
 ⱄ圓眠ך堣⠓ָ㟓ִ׷ "TTFU#VOEMFך侧ָ㢳ְ • ؽٕسח儗꟦ַַָ׷ • ٔا٦أوطآًٝزָꬊ䌢ח醱꧟ • تؐٝٗ٦س儗꟦ָ⠼ן׷
 醱侧ךؿ؋؎ٕ׾糺׭גְזְ㜥さ
  93. ҉໧ͷࢀরͱॏෳΞηοτ • AssetBundle͸௚઀assetbundle nameΛࢦఆ͠ͳ͍
 Ξηοτ΋AssetBundleʹؚΊΔɻ • طʹInstance IDׂ͕ΓৼΒΕ͍ͯͨ৔߹ɺ
 ৽͘͠Instance IDΛׂΓৼΒΕΔɻ

  94. None
  95. "TTFU#VOEMF "TTFU#VOEMF ⴽך*OTUBODF*%ָ
 ⶴ׶䮶׵׸׷

  96. SFTPVSDF"TTFU#VOEMF "TTFU#VOEMF "TTFU#VOEMF

  97. AssetBundleͷѹॖ ꬊ㖇簭 -; -;."

  98. AssetBundleͷѹॖ • ඇѹॖɿѹॖ͠ͳ͍ҝɺϑΝΠϧαΠζ͸େ͖͍ɻ
 ɹɹɹɹμ΢ϯϩʔυग़དྷΕ͹ΞΫηε͸࠷଎ɻ • LZ4ɹɿLZMAฒͷߴ͍ѹॖ཰ͱɺඇѹॖฒͷղౚ଎౓ɻ
 ɹɹɹɹUnity 5.3Ҏ߱ʹ࢖༻Մೳɻ • LZMAɿ࠷΋ߴ͍ѹॖ཰ɻ࠷΋஗͍ղౚ଎౓ɻ


    ɹɹɹղౚ͢Δʹ͸ɺҰ୴શͯϝϞϦʹల։͢Δඞཁ͕͋Δɻ
  99. AssetBundleͷಡࠐ • AssetBundle.LoadFromFile • AssetBundle.LoadFromMemory
 (WWW.assetBundle) • WWW.CacheOrDownload

  100. AssetBundleͷಡࠐ • AssetBundle.LoadFromFile • چ໊CreateFromFile • ϔομΛಡΈɺϩʔΧϧετϨʔδ΁௚઀ΞΫηε͢Δɻ • ※ΤσΟλ͸LoadFrommemoryAsyncͷΑ͏ͳಈ࡞Λߦ͏ҝɺ
 ɹएׯͷΦʔόʔϔου͕͋Δɻ

    • LZMAΛಡΉ৔߹ɺLoadFromMemoryͱಉ༷ͷಈ࡞ɻ
  101. 0 30 60 90 120 ඇѹॖ LZ4 LZMA ϔομʔ AssetBundle

    Ξηοτ -PBE'SPN'JMFT
  102. AssetBundleͷಡࠐ • AssetBundle.LoadFromMemory • چ໊CreateFromMemory • ϝϞϦ͔ΒAssetBundleΛߏங͠ɺϩʔυ͢Δ • LZ4ͷ৔߹ɺϝϞϦʹͦͷ··ίϐʔ͢Δɻ
 LZMAͷ৔߹ɺશͯղౚ͠LZ4΁࠶ѹॖ͢Δʢ5.3Ҏ߱ʣ

    • AssetBundleΛ҉߸Խ͢Δ৔߹ʹͷΈ͓קΊ
  103. 0 75 150 225 300 ඇѹॖ LZ4 LZMA ϔομʔ AssetBundle

    ΤϯδϯϝϞϦ Ξηοτ -PBE'SPN.FNPSZ
  104. 0 100 200 300 400 ඇѹॖ LZ4 LZMA ϔομʔ WWW

    AssetBundle ΤϯδϯϝϞϦ Ξηοτ 888BTTFU#VOEMF
  105. AssetBundleͷಡࠐ • WWW.CacheOrDownload • ΞηοτΛμ΢ϯϩʔυ͠ɺUnityͷΩϟογϡγεςϜͰΩϟογϡ͢Δ • LZ4ٴͼແѹॖͷ৔߹ɺϝϞϦʹͦͷ··อଘ͢Δ
 LZMAͷ৔߹ɺղౚ͠LZ4΁࠶ѹॖ͢Δʢ5.3Ҏ߱ʣ • ىಈ࣌ʹΩϟογϡͷ༗ແ΍࡟আ൑ఆΛߦ͏

    • 2ճ໨Ҏ߱͸Ωϟογϡ͔Βऔಘ͢Δ
  106. 0 75 150 225 300 ඇѹॖ LZ4 LZMA ϔομʔ AssetBundle

    ΤϯδϯϝϞϦ Ξηοτ $BDIF0S%PXOMPBEⴱ㔐
  107. 0 15 30 45 60 ඇѹॖ LZ4 LZMA ϔομʔ ΤϯδϯϝϞϦ

    Ξηοτ $BDIF0S%PXOMPBEٍؗحءُ״׶《䖤
  108. AssetBundleͷಡࠐ • UnityWebRequest & DownloadHandler • AssetBundleΛϩʔΧϧετϨʔδʹμ΢ϯϩʔυ͠ɺΩϟογϡ͢Δɻ • LZ4ͷ৔߹ɺϝϞϦʹͦͷ··ίϐʔ͢Δɻ
 LZMAͷ৔߹ɺશͯղౚ͠LZ4΁࠶ѹॖ͢Δʢ5.3Ҏ߱ʣ

    • WWW.CacheOrDownloadͱൺֱ͠ɺσʔλͷॲཧΛࢦఆ͢Δ͜ͱͰώʔϓΛ཈͑ΒΕΔ
  109. 0 17.5 35 52.5 70 ඇѹॖ LZ4 LZMA ϔομʔ WebRequest

    Ξηοτ -PBE'SPN.FNPSZ
  110. AssetBundleͷΞηοτͷಡΈࠐΈ • LoadAsset • LoadAllAssets • LoadAssetWithSubAssets • AsyncΛ෇͚Δͱඇಉظ

  111. AssetBundleͷΞηοτͷಡΈࠐΈ • LoadAsset
 ୯ҰͷΞηοτΛऔΓग़͢ • LoadAllAssets
 AssetBundle͕಺แ͢Δɺ௚઀ࢀরՄೳͳΞηοτΛશͯऔΓग़͢
 શମͷ2/3Λ࢖༻͢Δ৔߹ɺLoadAssetΑΓޮ཰త • LoadAssetWithSubAssets


    αϒΞηοτʢLocalIDͷؔΘΔΞηοτʣΛऔΓग़͢
  112. AssetBundleͷΞηοτͷಡΈࠐΈʢඇಉظʣ • AsyncΛઃఆ͢ΔͱɺΞηοτͷಡࠐΛ
 ϫʔΧʔεϨουͰߦ͏ɻ • 1ϑϨʔϜͷॲཧ࣌ؒ͸ThreadPriorityͰઃఆ
 High- ࠷େ50ϛϦඵɺNormal - 10ϛϦඵ


    BelowNormal - 4ϛϦඵɺLow - 2ϛϦඵ
  113. AssetBundleͷΞηοτͷಡΈࠐΈʢඇಉظʣ • 5.1Ͱ͸ɺ1ϑϨʔϜ1Ξηοτͱ͍͏Ṗಈ࡞Λ͍ͯͨ͠ɻ
 ʢͦͷҝɺϩʔυ͢ΔΞηοτʹΑͬͯఀࢭ࣌ؒʹόϥ͖͕ͭ͋ͬͨʣ • 5.2·Ͱ͸ɺLoadAllAssetsAsyncͱLoadAssetWithSubAssetAsync͕େ෯ ʹ஗͍ෆ۩߹͕͋ͬͨɻ • 5.3͔ΒUnityEngine.Objectͷϩʔυ΋ϫʔΧʔεϨουͰ࣮ߦ͢Δɻ
 ฒྻҰׅͰॲཧ͠ɺϩʔυ׬ྃޙʹAwake͕ݺ͹ΕΔɻ

  114. ಺ଂΩϟογϡγεςϜ • LoadFromCacheOrDownload΋͘͠͸ DownloadHandlerAssetBundleΛ࢖༻͢Δͱɺ
 ಺ଂΩϟογϡγεςϜΛ࢖༻͢Δɻ • LZMAΛΩϟογϡ͢ΔࡍɺLZ4΁࠶ѹॖ͢Δࣄ͕Ͱ͖Δɻ • Ωϟογϡͨ͠AssetBundle͸ɺLoadFromFilesͰ
 ௿ίετͰΞΫηεग़དྷΔɻ

  115. ಺ଂΩϟογϡγεςϜͷಈ࡞ • 䭷㹀ך"TTFU#VOEMFָ֮׸לٍؗحءַُ׵《䖤׃ծ搀ֽ׸לتؐٝٗ٦سׅ׷կ
 ⡎׃ծغ٦آّٝ׾♳־ג׮傊غ٦آّٝ׾⵴ꤐ׃זְկ • Ωϟογϡͷॲཧ͸ϫʔΧʔεϨουͰߦ͏ɻ • ෳ਺Λಉ࣌ʹ૸ΒͤΔͱOSͷಉ࣌ΞΫηεݶք਺ʹୡ͢ΔʢಛʹϞόΠϧʣ

  116. ಺ଂΩϟογϡγεςϜͷಈ࡞ • 饯⹛儗חٍؗحءُך剑穄⢪欽傈׾然钠׃גծ
 劢⢪欽劍꟦ָ䭷㹀劍꟦׾麓ֺגְ׸ל⵴ꤐׅ׷կ • أزٖ٦آָ♧匈חז׷הծ劢⢪欽ך،إحزַ׵⵴ꤐׅ׷կ • "TTFU#VOEMFך陎ⴽכؿ؋؎ٕせ • 䭷㹀ך"TTFU#VOEMF׾僇爙涸ח⵴ꤐׅ׷"1*ָ搀ְ


    铎׏׋DSD׾䭷㹀ׅ׷ה⵴ꤐׁ׸׷
  117. ಺ଂΩϟογϡγεςϜ ًٔحز -;."׾تؐٝٗ٦س׃׋㜥さד׮ծ
 խ-;׾⢪欽⳿勻׷կ ה׶ִ֮׆⢪ִ׷ رًٔحز - 稢ְַ،إحز盖椚ָדֹזְկ - ،إحزָ㟓ִֺׅ׷הծ،إحزך剣搀

    ثؑحؙ瘝ד儗꟦ַַָ׷կ
  118. ΩϟογϡγεςϜΛࣗ࡞͢Δ৔߹ • WWWΫϥε͸bytesΞΫηε༻ʹʢΤϯδϯଆ͕ʣ
 ϝϞϦΛ֬อ͍ͯ͠ΔҝɺϝϞϦΛ༨ܭʹ࢖͏ɻ • ਪ঑ • HttpWebRequest ɹ(PC͸ݱࡏHTTPSΛ࢖͑ͳ͍ʣ •

    ωΠςΟϒϓϥάΠϯ
 ʢΦϯσϚϯυϦιʔε(iOS)ɾDownloadManager(android)
 ɹNSURLConnection(iOS) ɾjava.net.HttpURLConnection(Androidʣ)
  119. ،إحز麊欽كأز٥فؙٓذ؍أ
 ⟎

  120. ಉҰͷཁૉΛେྔʹؚΜͩPrefab͸ආ͚Δ • ΦϒδΣΫτ͸શͯͦͷ··γϦΞϥΠζ͞ΕΔҝɻ • ྫ͑͹ಉҰͷPrefabΛ30ݸίϐʔͯ͠ϦετϏϡʔΛ ࡞ͬͨ৔߹ɺಉ͡σʔλΛ30ճσγϦΞϥΠζ͢Δɻ • ୯ҰͷPrefabΛInstantiateΛ࢖༻ͯ͠
 ෳ੡ͨ͠ํ͕ɺएׯޮ཰తɻ

  121. Resources • Resources/AssetBundleʹ͸ɺ
 ௚઀ࢀর͠ͳ͍Ξηοτ͸ؚΊͳ͍ɻ • ResourcesͷΞηοτ͸ग़དྷΕ͹ݮΒ͢ɻ

  122. ResourcesΛ࢖Θͳ͍ʢUnityࣾ಺ͷ͓קΊʣ • Resources͸ϓϩτλΠϓ༻ͱׂΓ੾Δ • ৗʹΞΫηε͢Δඞཁ͕͋ΔɺΞηοτʹͷΈ࢖͏

  123. ResourcesΛ࢖Θͳ͍…ʢͲ͏͢ΜͶΜ…ʣ ،فٔח"TTFU#VOEMF׾ろ׭ג׃תֲկ
 4USFBNJOH"TTFUT瘝 "OESPJEכBQLⰻ[JQⰻח4USFBNJOH"TTFUTָ֮׶ -PBE'SPN'JMFד،ؙإأ⳿勻זְ׋׭ծ $BDIF0S%PXOMPBEװ⡦׵ַך䩛ד《׶⳿ׅկ పఈ͢Δ͜ͱͰɺ։ൃΛ໘౗ʹग़དྷΔɻ
 ʢResourcesΛ࢖༻͢Δͷͱൺֱͯ͠ʣ

  124. AssetBundleͷ෼ׂ • ࿦ཧΤϯςΟςΟ • λΠϓͷάϧʔϓ • ಉ࣌ίϯςϯπͷάϧʔϐϯά • 1Asset 1AssetBundle

    • Ұͭʹ߆ΒͣɺέʔεόΠέʔεͰ࢖͍෼͚Δ
  125. AssetBundleͷ෼ׂ • ࿦ཧΤϯςΟςΟ • DLC౳ʹ࢖͍΍͍͢ϑΥʔϚοτ • ϨΠΞ΢τ΍UI • ΩϟϥΫλʔ •

    ڞ༗͢ΔഎܠͷϞσϧ΍ςΫενϟ
  126. AssetBundleͷ෼ׂ • λΠϓͷάϧʔϓ • ಉλΠϓͷΞηοτʢTexture΍AudioʣΛҰͭʹ·ͱΊΔ • ਺͕গͳ͘ɺϩʔΧϧ͔Β઀ଓ͢ΔͳΒجຊܨ͗ͬͺͳ͠ͰOK

  127. AssetBundleͷ෼ׂ • ಉ࣌ʹ࢖༻͢ΔίϯςϯπͰάϧʔϐϯά • ඞཁʹͳΔΞηοτΛɺඞཁͳ෼͚ͩϩʔυ͢Δɻ • SceneΛAssetBundleԽ͓ͯ͘͠࢖͍ํ • Կ౓΋࢖༻͢ΔΞηοτ͸෼ׂ͢Δ •

    ଟগͷΞηοτͷॏෳ͸ؾʹ͠ͳ͍
  128. AssetBundleͷ෼ׂ • ̍Ξηοτ̍Ξηοτόϯυϧ • ݸผʹΞηοτΛऔಘ͢Δ • ΧʔυήʔϜ౳Ͱ༗ར • ґଘؔ܎ͷղܾ͸εΫϦϓτͰߦ͏ •

    γΣʔμʔ౳ͷ҉໧ͷϩʔυΛݟམͱ͢ͱ༨ܭͳίετ͕ग़Δࣄ͕͋Δ • 5.3ະຬͰAssetBundleΛ࢖༻͢Δ৔߹͸࠷దղ͔΋͠Εͳ͍
 ʢLZMA͕େ͖ͳαΠζͰۃ୺ʹ஗͘ͳΔҝʣ
  129. ґଘઌAssetBundle͸Unload͠ͳ͍ • Ξηοτͷ։์ͷΈΛߦ͍ɺAssetBundle͸ҡ࣋͢Δɻ • Ξηοτͷෳ੡ʹΑΔϝϞϦɾϩʔυίετΛ๷͙ • Loadҡ࣋ʹ΋ίετ͕͋ΔͷͰɺέʔεόΠέʔεͰɻ • ෼ׂ਺ʹ΋ґΔ

  130. AssetBundle͸ͲͷѹॖΛ࢖͏΂͖͔ • ϩʔυ଎౓Λ্͍͛ͨ৔߹ɿɹඇѹॖʢ࠷଎ʣ LZ4ʢόϥϯεʣ • Ϗϧυ͕࣌ؒ໰୊ͳ৔߹ɹɿɹඇѹॖʢѹॖॲཧ͕ແ͍ʣ • ΞϓϦαΠζ͕໰୊ͳ৔߹ɿɹLZMAʢѹॖ཰࠷ߴʣ • ࢖༻ϝϞϦ͕໰୊ͳ৔߹ɹɿɹLZ4

    or ඇѹॖ • ௨৴͕࣌ؒ໰୊ͳ৔߹ɹɹɿɹLZMAʢཁCacheOrDownloadܥ)
  131. AssetBundleͷμ΢ϯϩʔυ͸Ͳ͏΍Δʁ • 5.3Ҏ߱͸WebRequest͕͓קΊ • WWW͸ආ͚Δ • CacheOrDownloadΛ࢖͏ͳΒ͹ɺ
 ώʔϓ͕๲ΒΈա͗ͳ͍Α͏ʹ͢Δɻ

  132. ʮϕετϓϥΫςΟεʯΛ৴͡ͳ͍ • ؀ڥ΍ήʔϜʹΑͬͯ࠷దղ͸ҟͳΔɻ

  133. ʮϕετϓϥΫςΟεʯΛ৴͡ͳ͍ • ؀ڥ΍ήʔϜʹΑͬͯ࠷దղ͸ҟͳΔɻ • Stay alert! Trust no one! Keep

    your laser handy!
  134. None