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

PostProcessBuild のおはなし

PostProcessBuild のおはなし

Tetsuya Mori

February 14, 2014
Tweet

More Decks by Tetsuya Mori

Other Decks in Programming

Transcript

  1. ·͓͖͑ w 6OJUZ w WFSTJPOG w ͸J04ͷ888 Ϋϥεʹόά͋Γʁ w 1SP-JDFOTF

    w 1SP͡Όͳͯ͘΋
 େৎ෉͔΋ʁ
 w #VJME1MBUGPSN w J04 w "OESPJE w %FWFMPQNFOU1MBUGPSN w 049.BSWFSJDLT w 8JOEPXT w ඇαϙʔτػೳΞϦ
  2. ར༻༻్ w "3$Λ࢖͍ͬͯΔ/BUJWF1MVHJOʹGPCKDBSDΛ෇༩ w "OESPJE.BOpFTUYNMͷՃ޻ w BEWFSUJTJOH*EFOUJpFS *%'" ໰୊΁ͷରԠ w

    6OJUZͷ࣍όʔδϣϯΞοϓσʔτͰ
 ௚ΔΒ͍͚͠Ͳɻ w ԿΕʹͯ͠΋ɺYDPEFQSPKͱ͔"OESPJE.BOJGFTUʹ
 ͍ͭͯɺ͋Δఔ౓஌ࣝΛཁ͢Δ
  3. γΣϧεΫϦϓτͷ৔߹ w ࣮ߦ࣌ͷҾ਺  ग़ྗઌͷϑϧύε  #VJME1MBUGPSNछผ w J04lJ1IPOFz w

    "OESPJElBOESPJEz  ࠷దԽछผ 4USJQQJOH-FWFMʁ   ձ໊ࣾ  ϓϩμΫτ໊  ը໘ԣ෯  ը໘ॎ෯
  4. γΣϧεΫϦϓτͷ৔߹ w ஫ҙ఺ w ʮͦ͏ɺ.BDͳΒͶɻʯ w ޙड़ͷ<1PTU1SPDFTT#VJME / >ଐੑΑΓ΋ઌʹ࣮ߦ͞ΕΔ w

    ·͊ɺιϨࣗମ͸໰୊͡Όແ͍Μ͕ͩɺ3VCZ(FNTͷYDPEFQSPKͱɺޙड़ ͷ9DPEF&EJUPSGPS6OJUZΛซ༻͢ΔͱϋϚΔ w ͬͯͷ΋ɺ9DPEF&EJUPSGPS6OJUZ͸"4$**'PSNBUQMJTU͔͠ಡΈॻ͖Ͱ ͖ͳ͍ͷ͕ͩɺ3VCZ(FNTͷYDPEFQSPK͸9.-'PSNBUQMJTUͱͯ͠ॻ͖ ग़ͯ͠͠·͏ͷͰɺ<1PTU1SPDFTT#VJME / >ଆͰΤϥʔΛͿ͍ͬͯ͘͜ΕΔ w 'BDFCPPL4%,GPS6OJUZΛ࢖͏৔߹ɺ<1PTU1SPDFTT#VJME / >ͷॲཧ಺Ͱ 9DPEF&EJUPSGPS6OJUZΛ༻͍͍ͯΔͷͰɺ࣮֬ʹ্هͷ໰୊ʹϒν౰ͨΔ
  5. 6OJUZεΫϦϓτͷ৔߹ w ઌͣ͸6OJUZ.BOVBMಡΈ·͠ΐ͏ w 6OJUZ͔Βར༻Մೳʹͳͬͨ Β͍͠  w .BD8JOEPXTͲͪΒͰ΋ w

    "TTFUT &EJUPS  DTcKT  w 6OJUZతʹ&EJUPS4DSJQUͰ͋Δͱೝࣝग़དྷΔ ύεͳΒ0,ͬͯίτ
  6. 6OJUZεΫϦϓτͷ৔߹ w /&5ʹग़དྷΔίτͳΒԿͰ΋͟͝Ε w ΋ͪΖΜ6OJUZͱͯ͠ͷػೳ΋࢖͑ΔͷͰɺ
 3FTPVSDFT-PBE ͱ͔΋࢖͑ͨΓ͢Δ w ϙΠϯτ͸ೋͭ w

    &EJUPSσΟϨΫτϦҎԼʹ഑ஔ͢Δ w QVCMJDTUBUJDͳϝιουʹ<1PTU1SPDFTT#VJME / > Λଐੑઃఆ͢Δ /࣮ߦॱং
  7. 6OJUZεΫϦϓτͷ৔߹ w ͜Μͳײ͡ɻ public static class PostProcessBuild {
 [PostProcessBuild(100)]
 public

    static void OnPostProcessBuild(BuildTarget target, string path) { if (target == BuildTarget.iPhone) { Debug.Log("iOS: " + path);
 }
 if (target == BuildTarget.Android) {
 // ී௨ʹ Build ͨ͠৔߹͸ apk ͷঢ়ଶͰ౉͞ΕΔͷͰɺ੍ޚ͢Δ
 if (!Regex.IsMatch(path, "\\.apk$")) { Debug.Log("Android: " + path);
 }
 }
 }
 }
  8. ϝϦοτσϝϦοτ γΣϧεΫϦϓτ w ϝϦοτ w ׳ΕͨݴޠͰॻ͚Δ w ࣮૷࣌ͷ֬ೝָ͕ w Ҿ਺፻଄ͯ͠ΩοΫ

    ͢Ε͹0, w ݴޠʹґͬͯ͸ϥΠϒ ϥϦ͕๛෋
 w σϝϦοτ w 6OJUZͷػೳ͕࢖͑ͳ ͍ w ϩάग़͠ਏ͍ w Τϥʔ͕ى͖ͯͯ΋ؾ ෇͖ʹ͍͘ w 8JOEPXTΦϫίϯ
  9. ϝϦοτσϝϦοτ 6OJUZεΫϦϓτ w ϝϦοτ w 6OJUZͷػೳ࢖͑Δ w ૭Ͱ΋ಈ͘ w ؤுΕ͹ϓϩδΣΫτ

    ґଘͳ஋Λ෼཭Ͱ͖Δ w 4DSJQUBCMF0CKFDU ͱ͔࢖͑͹Ͷɻ
 w σϝϦοτ w Τϥʔى͖Δͱࢭ·Δ w ֬ೝ͕ϝϯυ͍ w ຖճϏϧυ͠ͳ͍ͱ ͩΊΆ
  10. "TTFU1PTUQSPDFTTPS w ઌͣ͸6OJUZ.BOVBMΛʜ SZ w ϙΠϯτ͸ҎԼͷ௨Γ w &EJUPSσΟϨΫτϦҎԼʹ഑ஔ w 6OJUZ&EJUPS"TTFU1PTUQSPDFTTPSΛܧঝ

    w 0O 1SFc1PTU QSPDFTT "VEJPc.PEFMc5FYUVSF ϝιου Λ࣮૷ ଞʹ΋ز͔ͭ͋Δ͚ͲͶ  w .FTTBHJOHͷػೳʹΑΓݺͼग़͞ΕΔ