Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AssetBundleDownloadSize

 AssetBundleDownloadSize

How to implement to show download size of Unity AssetBundle. ( Written in Japanese )

Cova8bitdots

March 24, 2019
Tweet

More Decks by Cova8bitdots

Other Decks in Programming

Transcript

  1. AssetBundleμ΢ϯϩʔυαΠζදࣔରԠ খྛ ܚ༞ גࣜձࣾϛΫγΟ ΤϯλʔςΠϯϝϯτࣄۀຊ෦

  2. ஫ҙ • XFLAG ελδΦͷ৽ن։ൃλΠτϧͰ࢖͍ͬͯΔํ๏Ͱ͢
 • Apple Storeͷ৹ࠪΛ௨ͯ͠ແ͍ͷͰඞͣ͠΋े෼Ͱແ͍Մೳੑ͕͋Γ·͢ 2

  3. ࣗݾ঺հ ࢯ໊ɿখྛ ܚ༞ ܦྺ • 2018/4݄ த్ೖࣾ • ৽نήʔϜͷ։ൃʹैࣄ •

    AssetBundleΛ࢝Ίͱͨ͠ج൫γεςϜ΍
 UIपΓͷ࣮૷Λத৺ʹߦ͏ 3
  4. AppStore৹ࠪΨΠυϥΠϯ https://developer.apple.com/jp/app-store/review/guidelines ΑΓҾ༻ 4

  5. AppStore৹ࠪΨΠυϥΠϯ 5 ཁ͢Δʹ͜Εͬͯʮμ΢ϯϩʔυ࣌ʹAssetBundleͷαΠζΛදࣔ͠·͠ΐ͏ʯͱ͍͏͓ୡ͠ɻɻɻ

  6. ෆ໌ྎͳ఺ • ஞ࣍μ΢ϯϩʔυͰ࣮૷͍ͯ͠Δ৔߹౎౓ද͕ࣔඞཁʁ • ॳճҰׅμ΢ϯϩʔυΛߦ͏৔߹͸ͦΕͰOK?
 (߹ܭαΠζ͕Θ͔ΔͷͰ) • ߹ܭαΠζͷΈදࣔʁݸผදࣔ΋ඞཁʁ 6 ৭ʑෆ໌ͳ఺͕͋Γ·͕͢ɺͲͪΒʹͤΑ

    ʮAssetBundleͷαΠζදࣔରԠʯ͸ආ͚ΒΕͳ͍໛༷
 (͜ͷ͋ͨΓ஌ݟ͕͋Δਓ͸৘ใΛڭ͑ͯ௖͚Δͱ༗೉͍Ͱ͢!!)
  7. αΠζදࣔରԠํ਑ • AssetBundleManifest ʹରͯ͠αΠζऔಘϝιου͕͋Ε͹͍͍ • ެࣜʹ͸ແ͍(༻ҙͯ͘͠ΕΔͱخ͍͠ͳ͊ɻخ͍͠ͳ͊) • Manifest͸όΠφϦͱYAML Ͱॻ͔ΕͨϑΝΠϧͷ2͕ͭੜ੒͞ΕΔ
 →όΠφϦͷՃ޻͸ͭΒ͍


    →YAML ͳΒਓؒͰ΋ಡΊΔ!! 7 ੜ੒ͨ͠YAMLΛՃ޻ → DL→ಠࣗϚχϑΣετͱͯ͠ύʔε
  8. ManifestϑΝΠϧ 8 ManifestϑΝΠϧͷߏ੒৘ใ • Version৘ใ • CRC • Ξηοτόϯυϧ৘ใͷ഑ྻ •

    ໊લ • ґଘؔ܎ ManifestϑΝΠϧͷߏ੒৘ใ • Version৘ใ • CRC • Ξηοτόϯυϧ৘ใͷ഑ྻ • ໊લ • ґଘؔ܎ • (New!!) αΠζ • (Optional) Hash • (Optional) CRC Ճ޻
  9. ಠࣗManifest࡞੒ ϫʔΫϑϩʔ 1. AssetBundleΛੜ੒
 2. ੜ੒ͨ͠yaml Λղಡ
 3. ੜ੒֤ͨ͠AssetBundleͷαΠζΛऔಘͯ͠2. ͱ৘ใΛ౷߹


    4. ద੾ͳܗࣜͰՃ޻ͨ͠ManifestϑΝΠϧΛੜ੒ 9 YAMLΛ͍͡Δ͜ͱ͔Βpython Λબ୒ ॳΊͯͷਓͰ΋؀ڥߏஙʙ࣮૷·Ͱ1~2೔ఔ౓Ͱ͍͚·͢ʂ UnityతʹύʔεͷύϑΥʔϚϯε͕ JSON>YAML ͳͷͰJSONͰग़ྗ
  10. ಠࣗManifestύʔε 10 • YAMLͷύʔε
 →yaml Ϟδϡʔϧ(PyYAML)Λ࢖͏
 
 ϑΝΠϧαΠζऔಘ
 → osϞδϡʔϧͰղܾ

    • ϑΝΠϧग़ྗ
 → YAML :
 
 → JSON : Python ͳΒେ఍ͷ໘౗ͳॲཧΛ
 ҰߦͰղܾͯ͘͠ΕΔͷͰ࣮૷ָ͕
  11. ಠࣗManifestύʔε 11

  12. ͓ΘΓʹ • AssetBundleͷαΠζऔಘํ๏ͷରԠྫΛ঺հ͠·ͨ͠
 →YAMLղੳ/Ճ޻ʴಠࣗϚχϑΣετͷ࡞੒ͰରԠ • AppStore ৹ࠪΨΠυϥΠϯͷ৘ใ͕͋·Γग़ճͬͯͳ͍ͨΊ
 ΋͔ͨ͠͠ΒରԠෆ଍ͷՄೳੑ͕͋Γ·͢
 ↑Կ͔৘ใΛ͓࣋ͪͷํ͸ੋඇͱ΋৘ใڞ༗Λ͓ئ͍͠·͢!!
 12

  13. Thank you for listening