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

Unity講習資料

torisoup
October 15, 2014

 Unity講習資料

http://ch.nicovideo.jp/dwango-engineer/blomaga/ar644728
ドワンゴ 1monthインターンシップにて使用した講習の資料です

資料中に出てくるunitypackageはこちら http://ge.tt/5zaMWg12?c?c

torisoup

October 15, 2014
Tweet

More Decks by torisoup

Other Decks in Technology

Transcript

  1. ͓͠ͳ͕͖   6OJUZͷ֓ཁ   6OJUZͷ༻ޠղઆ   ૢ࡞࿅श   ෺Λ࡞ͬͯ഑ஔͯ͠ΈΔ  

    ࣗ෼Ͱૢ࡞Ͱ͖ΔΩϟϥΫλΛ࡞੒͢Δ   ಈతʹΦϒδΣΫτΛੜ੒ͯ͠ΈΔ   ϢχςΟͪΌΜΛ഑ஔͯ͠ಈ͔͢   0DVMVT3JGUΛ࢖ͬͯΈΔ   5JQT 2 ͜ͷεϥΠυ͸ʮϢχςΟͪΌΜϥΠηϯεʯͰఏڙ͞Ε͍ͯ·͢
  2. 6OJUZͷϥΠηϯε •  'SFF൛ –  1ػೳ͕Ұ෦੍ݶ͞Ε͍ͯΔ –  ࡞੒ͨ͠ήʔϜ͸ࣗ༝ʹެ։ɺൢചͰ͖Δ –  ͨͩ͠ऩӹ͕೥ؒສΛ௒͑ΔͳΒ1SP൛͕ඞཁ • 

    1SP൛ –  6OJUZͷػೳΛϑϧͰ࢖͑Δ –  ߴ͍ʢങ͍੾Γ͕໿ສԁɺֹ݄ϓϥϯͰ΋݄ ԁʣ –  ڽͬͨήʔϜΛ࡞ΔͳΒඞਢ 5
  3. 1SP൛ͷػೳʢҰ෦ʣ •  ىಈ࣌ͷϩΰΛফͤΔ λΠτϧϩΰมߋʣ •  .FDBOJNͰ*,͕࢖͑ΔʢΩϟϥ͕෺Λ௫Ήಈ࡞ͳͲΛදݱͰ͖Δʣ •  ΦʔσΟΦʹΤϑΣΫτ͕ઃఆͰ͖Δ •  ΦΫϧʔδϣϯΧϦϯά͕࢖༻Ͱ͖Δʢඳը࣌ͷෛՙܰݮʣ

    •  ϙετΤϑΣΫτ͕࢖༻Ͱ͖Δʢ)%3ɺඃࣸքਂ౓ɺ44"0ͱ͔ઃఆͰ͖Δʣ •  ϓϩϑΝΠϥ͕࢖͑Δʢඳը΍εΫϦϓτͷ࣮ߦ࣌ؒ΍ϝϞϦ࢖༻ྔͷϞχλʣ •  ωΠςΟϒϓϥάΠϯͷΠϯϙʔτ͕Ͱ͖Δ 6
  4. 11

  5. σΟϨΫτϦߏ੒ •  "TTFU –  ࢖༻͢ΔશͯͷϦιʔε܈͕อଘ͞ΕΔσΟϨΫτϦ  •  1SPKFDU4FUUJOHT –  ϓϩδΣΫτʹ͓͚Δ6OJUZͷઃఆϑΝΠϧ͕อଘ͞ΕΔσΟϨΫτϦ

     όʔδϣϯ؅ཧʹೖΕΔσΟϨΫτϦ͸"TTFU 1SPKFDU4FUUJOHTͷΈͰྑ͍ -JCSBSZ 5FNQσΟϨΫτϦ͸؀ڥґଘͷࣗಈੜ੒ϑΝΠϧ͕อଘ͞ΕΔ৔ॴ 18
  6. 1MBOFͷҐஔΛௐ੔ 1MBOFΛબ୒ͨ͠ঢ়ଶͰ*OTQFDUPSϏϡʔͷ5SBOTGPSNʹҎԼͷ஋Λೖྗ        

    5SBOTGPSN͸Ґஔ࢟੎Λѻ͏$PNQPOFOU શͯͷ(BNF0CKFDUʹඞͣ෇༩͞Ε͍ͯΔ 29
  7. ͍Ζ͍Ζ഑ஔͯ͠ΈΔ •  $VCFʢശʣ •  $BQTVMFʢΧϓηϧʣ •  4QIFSFʢٿମʣ •  $ZMJOEFSʢԁபʣ 

    Λద౰ʹੜ੒ͯ͠1MBOFΑΓ্ʹ഑ஔͯ͠ΈΔ 1MBOFΛબ୒ͯ͠ੜ੒͢Δͱ1MBOFͱಉ͡࠲ඪʹੜ੒͞ΕΔͷͰҐஔௐ੔͕গָ͔͠΋ 40
  8. ෺ཧΤϯδϯ •  ෺ཧԋࢉΛ༗ޮʹ͢Δͱ෺ཧ๏ଇʹैͬͨಈ͖ʹͳΔ –  ຎࡲɾॏྗɾۭؾ఍߅Λड͚Δ –  $PMMJEFSʢ౰ͨΓ൑ఆʣʹিಥ͢Δ –  িಥ͢Ε͹ό΢ϯυ͢Δ͠ɺӡಈྔͷ఻ୡ΋ى͖Δ 

    •  3JHJECPEZΛ࢖͏ͳΒ෺ཧ๏ଇʹ൓͢Δಈ͖Λͤ͞ͳ͍ํ͕ྑ͍ –  ׳ੑͷ๏ଇʹैΘͣʹϐλοͱࢭΊͨΓɺٸՃ଎ٸટճͤͨ͞Γ͢Δͱڍಈ͕͓͔͘͠ͳΔ –  ෺ཧԋࢉΛ࢖͏ͳΒ଎౓Λ௚઀͍͡ΒͣɺྗΛ༩͑ͯ଎౓ΛมԽͤ͞Δ΂͖ 43
  9. ϓϨΠϠͱ෺ཧԋࢉ •  εΫϦϓτ੍ޚର৅ʹ3JHJECPEZΛదԠ͢Δͷ͸͓͢͢Ί͠ͳ͍ –  ࣭ྔɺۭؾ఍߅ɺॏྗͱ͍ͬͨύϥϝʔλͷௐ੔஍ࠈʹͳΔ –  εΫϦϓτ੍ޚͤ͞ΔͳΒ*T,JOFNBUJDΛUSVFʹ͢Δ΂͖  •  িಥԠ౴ͤ͞ΔͳΒ$IBSBDUFS$POUSPMMFSͱ͍͏$PNQPOFOUΛ࢖͏΂͠

    –  ϓϨΠϠΛ࡞੒͢ΔͷʹಛԽͨ͠$PNQPOFOU –  ҠಈϝιουΛఏڙͯ͘͠ΕΔʢিಥԠ౴ΛࣗಈͰߦͬͯ͘ΕΔʣ –  ϓϨΠϠͷೖྗͰಈ͘ΦϒδΣΫτ͸͜ΕΛ࢖ͬͨ΄͏͕͍͍  44
  10. ʢิ଍ʣςΫενϟͱϚςϦΞϧ •  ςΫενϟʢ5FYUVSFʣ –  ୯७ͳը૾Ϧιʔε –  ֦ுࢠ͸ը૾ܗࣜ KQHQOHHJG  • 

    ϚςϦΞϧʢ.BUFSJBM  –  ࡐ࣭ʢγΣʔμʣͱςΫενϟΛηοτʹͨ͠΋ͷ –  6OJUZͷಠࣗن֨ϑΝΠϧͰอଘ͞ΕΔ  75
  11. 6OJUZʹ͓͚ΔεΫϦϓτ •  ରԠݴޠ͸$ɺ6OJUZ4DSJQUɺ#PP –  .POPʢ$ɺ/&5૬౰ʣ –  $Ͱॻ͘͜ͱΛڧ͘ਪ঑  •  .POP#FIBWJPVSΛܧঝͨ͠Ϋϥε͸$PNQPOFOUѻ͍ʹͳΔ

    –  Ϋϥε໊ͱϑΝΠϧ໊͸Ұக͍ͯ͠Δඞཁ͕͋Δ –  .POP#FIBWJPVSΛܧঝ͠ͳ͍Ϋϥε΋࡞੒Ͱ͖Δ –  .POP#FIBWJPVSΛܧঝͨ͠ந৅ΫϥεΛ࡞͔ͬͯͦ͜Β೿ੜͤ͞Δͱศར 84
  12. "XBLFͱ4UBSU •  "XBLF –  ίϯετϥΫλతͳѻ͍ –  ΦϒδΣΫτੜ੒͕ऴΘͬͨ௚ޙʹ࣮ߦ͞ΕΔ –  ෳ਺ͷ$PNQPOFU͕͋Δ৔߹ͲͷॱͰ"XBLF͕࣮ߦ͞ΕΔ͔͸ະఆٛ • 

    4UBSU –  ࢝Ίͯ6QEBUF͕࣮ߦ͞ΕΔͦͷ௚લʹ࣮ߦ͞ΕΔ –  શͯͷ$PNQPOFOUͷ"XBLF͕׬͍ྃͯ͠Δ͜ͱ͕อূ͞Ε͍ͯΔ  90
  13. 6QEBUFͱ'JYFE6QEBUF •  6QEBUF –  ຖϑϨʔϜ࣮ߦ͞ΕΔ –  ϝΠϯͷήʔϜϩδοΫΛهड़͢Δ৔ॴ –  ࣮ߦִؒʹ͸ϒϨ͕͋Δ – 

    લϑϨʔϜͱͷ࣌ؒࠩ෼͸5JNFEFMUB5JNFͰΘ͔Δ •  'JYFE6QEBUF –  ৗʹݻఆִؒͰ࣮ߦ͞ΕΔ –  ෺ཧԋࢉʹґଘͨ͠ॲཧ͸ͪ͜Βʹॻ͘ –  *OQVUͷ஋͸'JYFE6QEBUF಺Ͱ͸ਖ਼͘͠औಘͰ͖ͳ͍ 91
  14. 4JNQMF.PWFͱ.PWF •  4JNQMF.PWF –  ਫฏํ޲ͷҠಈͷΈΛର৅ʢδϟϯϓ͸4JNQMF.PWFͰ͸࣮૷Ͱ͖ͳ͍ʣ –  ॏྗ͸ࣗಈՃࢉ͞ΕΔ –  ΄΅ϓϩτλΠϐϯά༻్ – 

    ೖྗ஋͸଎౓ϕΫτϧ<NT> •  .PWF –  ̏࣍ݩۭؒͰͷҠಈΛର৅ –  δϟϯϓ౳ͷཱମతͳಈ͖Λͤ͞Δ͜ͱ͕Ͱ͖Δ –  ॏྗ͸ࣗ෼Ͱܭࢉͯ͠Ճࢉ͢Δඞཁ͕͋Δ –  ೖྗ஋͸ҠಈྔϕΫτϧ<N> 99
  15. 2VBUFSOJPO •  ࢛ݩ਺ʢY Z [ X  •  ࢟੎Λදݱ͢Δ͜ͱ͕Ͱ͖ΔʢͲͷ࣠ʹԿ౓܏͍͍ͯΔ͔Λද͢ʣ • 

    6OJUZͷ2VBUFSOJPO͸ߏ଄ମʢϓϦϛςΟϒܕʣ •  5SBOTGPSNSPUBUJPOʹ͸2VBUFSOJPO͕ೖ͍ͬͯΔ –  ΠϯεϖΫλʔϏϡʔʹ͸3PUBUJPOΛΦΠϥʔ֯ʹม׵ͨ͠෺͕දࣔ͞Ε͍ͯΔ  2VBUFSOJPOΛ࢖͏ͱճసॲཧ͕؆୯ʹॻ͚Δ 107
  16. εΫϦϓτΛॻ͘ίπ εΫϦϓτΛ.7$ͬΆ͘෼཭͓ͯ͘͠ͱޙʑͪ͝Όͪ͝ΌʹͳΒͣΦεεϝ •  .PEFMʢຊମʣ –  ΩϟϥΫλͷ֩ͱͳΔ෦෼ –  ϝΠϯϩδοΫΛهड़͢Δ •  7JFXʢΞχϝʔγϣϯ౳ͷ੍ޚʣ

    –  ΩϟϥΫλͷঢ়ଶΛجʹΞχϝʔγϣϯͳͲΛ؅ཧ͢Δ෦෼ •  $POUSPMMFSʢೖྗड෇ʣ –  Ωʔೖྗ౳Λड͚෇͚Δ෦෼ –  ͜͜ͷࠩ͠ସ͚͑ͩͰ/1$͕؆୯ʹ࡞ΕΔ 123
  17. ԋश࣌ؒ •  514Χϝϥʹ͢Δ –  ΧϝϥΛճసͤͨ͞ޙɺΧϝϥΛҠಈͤ͞Δ –  7FDUPS-FSQ  Λ࢖͏ͱઢܗิؒ͞ΕͯͳΊΒ͔ͳಈ͖ʹͳΔ • 

    ࣗػ͕ਐߦํ޲Λ޲͘Α͏ʹ͢Δ –  USBOTGPSN-PPL"U  Λ࢖͏ͱ؆୯ʹͰ͖Δ •  εϖʔεΩʔͰδϟϯϓͰ͖ΔΑ͏ʹ͢Δ –  4JNQMF.PWF͔Β.PWFʹॻ͖׵͑Δඞཁ͕͋Δ –  ॏྗͷ࣮૷͕ඞཁ 124
  18. 1SFGBCͷࢦఆํ๏ •  *OTQFDUPSϏϡʔ͔Βࢦఆ͢Δํ๏ɹʢࠓճ΍ͬͨํ๏ʣ –  ݺͼग़͢1SFGBC͕গ਺͔ͭݻఆͳΒͬͪ͜ͷํָ͕ –  ࠩ͠ସ͑΋؆୯ʹͰ͖Δ   • 

    3FTPVSDFT-PBE ͰಡΈࠐΉํ๏ –  ॊೈʹ1SFGBCͷ࿈ܞ͕Ͱ͖Δ –  3FTPVDFTͱ͍͏໊લͷσΟϨΫτϦҎԼʹ͋Δ1SFGBCΛݺͼग़ͤΔ –  ಉظಡΈࠐΈͳͷͰϓνϑϦʔζ͕ى͖ΔՄೳੑ͕ߴ͍ 135
  19. ԋश •  ੜ੒ͨ͠#VMMFU͕ඵޙʹফ͑ΔΑ͏ʹ͢Δ –  %FTUPSZ Λ࢖͏ͱ(BNF0CKFDUΛ࡟আͰ͖Δ   •  #VMMFUʹॳ଎Λ༩͑ͯඈΜͰߦ͘Α͏ʹ͢Δ

    –  ඈΜͰߦ͘ํ޲͸ࣗ༝ʹܾΊͯྑ͍ʢΧϝϥͷ޲͍͍ͯΔํ޲ʹඈ͹͢ͱ͔ʣ –  ̏XBZ஄ͷ࣮૷͸2VBUFSOJPOͷษڧʹͳΔͷͰΦεεϝ •  #VMMFU͕ଞͷ෺ମʹিಥͨ͠Βফ͑ΔΑ͏ʹ͢Δ –  ৽͘͠4DSJQUΛॻ͍ͯ#VMMFUʹషΓ෇͚Δඞཁ͕͋Δ –  িಥ͸0O$PMMJTJPO&OUFSͰݕ஌Մೳ 136
  20. .FDBOJN •  .FDBOJN ϝΧχϜ  –  6OJUZͷΞχϝʔγϣϯ؅ཧػߏ –  εςʔτϚγϯΛ࢖ͬͨΞχϝʔγϣϯͷ࠶ੜɾભҠ – 

    ϘʔϯΛࣗಈղੳͯ͠ΞχϝʔγϣϯͷϦϚοϓ –  6OJUZҎ߱ͷΞχϝʔγϣϯ؅ཧ͸.FDBOJNͰ΍Δ΂͖ 147
  21. 163

  22. 176

  23. 6OJUZ։ൃΛߦ͏্Ͱେ੾ͳͷ5JQTू •  IUUQEFWNBHPSH[BUJQTGPSXPSLJOHXJUIVOJUZCFTU QSBDUJDFT –  άάΕ͹೔ຊޠ༁ग़ͯ͘Δ –  શͯΛकΔඞཁ͸ແ͍ –  ݸਓతʹॏཁͩͱࢥͬͨͷ

    •  1SFGBCͷ࠲ඪ͸ݪ఺ʹ͋ΘͤΖ •  1SFGBCͷ࿩શ෦ʢʙʣ •  .POP#FIBWJPVSΛ֦ுͨ͠جఈΫϥεΛ࡞Ε •  *OUFSGBDFΛ࢖͑ •  ֦ுϝιουͰػೳΛ૿΍ͤ •  ήʔϜϩδοΫͱΠϯλʔϑΣʔεΛ෼཭͠Ζʢ.7$ͬΆ͘͠Ζʣ •  "TTFUͷ໋໊نଇͱσΟϨΫτϦߏ੒ΛυΩϡϝϯτԽͯ͠कΕ 183