Unity Rendering Engines Guide
Unity Rendering Engines Guide
ntroducti
        ont oRenderingEngi  nes:Understandingt hecur r
                                                     entmar ketRender i
                                                                      ngEngines.
UnderstandingAR,VRandMR.Dept     hMapper s,Mobi  l
                                                 ePhones, Smar tGlasses,HMD’s
Unit
   yEngi ne:Mult
               i-
                platfor m publi
                              shing,VR+AR:  Introductionandwor  ki
                                                                 nginUni t
                                                                         y,2D,
Graphics,Physi
             cs,Scri
                   pt ing,Animat i
                                 on,Timeline,Mul ti
                                                  playerandNet working,UI,
Navigati
       onandPat hfi
                  ndi ng,XR, Publishi
                                    ng.
Scri
   pting:Scri
            pti
              ngOv erv i
                       ew, Script
                                ingToolsandEv   entOverview
XR:VR, AR,MR, Concept ualDifferences.SDK,Dev ices
Wor
  kingi
      nUni
         ty
I
nst
  all
    ati
      onOpt
          ions
Youcani
      nst
        all
          theUni
               tyEdi
                   tori
                      nthef
                          oll
                            owi
                              ngway
                                  s:
   TheHubprovi
              desacent
                     ral
                       locat
                           iont
                              omanagey
                                     ourEdi
                                          tori
                                             nst
                                               all
                                                 ati
                                                   ons,
                                                      Account
                                                            sand
    Li
     censes,
           andProj
                 ect
                   s.
   YoucanusetheDownl
                    oadAssi
                          stantt
                               oinst
                                   allt
                                      heEdi
                                          tor
                                            .Ify
                                               ousubsequent
                                                          lychooset
                                                                  o
    i
    nstal
        ltheHub,
               youcanaddi
                        ttotheHubatthatti
                                        me.
   TheUnityDownloadAssistantsuppor
                                  tsoffl
                                       i
                                       nedeployment
                                                  .Thi
                                                     sall
                                                        owsy out
                                                               odownload
    al
     lthenecessar
                yf i
                   l
                   esforinstal
                             li
                              ngUnityandgener
                                            ateascri
                                                   ptt
                                                     oinst
                                                         all
                                                           theEdit
                                                                 oron
    computerswit
               houtint
                     ernetaccess.
Uni
  tyHub
TheUnit
      yHubisastandaloneappl
                          icat
                             ionthatst
                                     reamlinesthewayyoufi
                                                        nd,downl
                                                               oad,and
manageyourUni
            tyProj
                 ectsandinstal
                             l
                             ati
                               ons.Inaddit
                                         ion,youcanmanual
                                                        lyaddver
                                                               sionsofthe
Edi
  tort
     hatyouhavealr
                 eadyinst
                        all
                          edony ourmachinetoy ourHub.
2Dor3Dpr
       oject
           s
Uni
  tyisequall
           ysuit
               edtocr
                    eati
                       ngboth2Dand3Dgames.Wheny oucreat
                                                      eanewproj
                                                              ecti
                                                                 n
Uni
  ty,youhavethechoi
                  cetost
                       artin2Dor3Dmode.Youcanswapbetween2Dor3Dmodeat
anyti
    mer egar
           dlessoft
                  hemodey ousetwheny
                                   oucreat
                                         edyourproj
                                                  ect.
                                       1
AssetWor
       kfl
         ow
Anassetisrepresentati
                    onofanyitem t
                                hatcanbeusedi ny ourgameorproject
                                                                .Anassetmay
comef rom afil
             ecreatedoutsi
                         deofUnity,suchasa3Dmodel  ,anaudi
                                                         ofil
                                                            e,animage,oranyof
theotherty
         pesoff i
                lethatUnit
                         ysupports.Therear
                                         ealsosomeassett ypesthatcanbecreated
withi
    nUnity,suchasanAni matorContr
                                oller,anAudi
                                           oMi xeroraRenderTexture.
Cr
 eat
   ingGamepl
           ay
Scenes
Scenescontai
           nt heenv
                  ironmentsandmenusofy ourgame.ThinkofeachuniqueScenef
                                                                     il
                                                                      easa
uniquelev
        el.I
           neachScene, y
                       ouplaceyourenv
                                    ironments,
                                             obstacl
                                                   es,anddecorat
                                                               ions,
essenti
      all
        ydesigni
               ngandbuildi
                         ngyourgameinpieces.
GameObj
      ect
        s
Everyobjecti
           ny ourgamei saGameObject
                                  ,fr
                                    om charact
                                             ersandcoll
                                                      ecti
                                                         blei
                                                            temstoli
                                                                   ghts,
camer asandspecialef
                   fects.However
                               ,aGameObjectcan’tdoanyt
                                                     hingonit
                                                            sown;youneedto
giv
  ei tproper
           ti
            esbeforeitcanbecomeacharact
                                      er,anenvironment
                                                     ,oraspecial
                                                               eff
                                                                 ect.
I
nput
Unit
   ysupportsthemostconv enti
                           onal
                              typesofi
                                     nputdevi
                                            ceusedwithgames(suchas
contr
    oll
      ers,
         joypads,
                keyboardandmouse)butalsothetouchscr
                                                  eensandmovement-
                                                                 sensi
                                                                     ng
capabi
     li
      ti
       esofmobi l
                edevices.Ital
                            sosuppor
                                   tsi
                                     nputfrom VRandARsy st
                                                         ems
Tr
 ansf
    orms
TheTransfor
          misusedtost
                    oreaGameObject’
                                  sposi
                                      tion,
                                          rotat
                                              ion,scal
                                                     eandparent
                                                              ingstat
                                                                    eand
i
sthusv er
        yimpor
             tant
                .AGameObjectwi
                             l
                             lalwayshav
                                      eaTr ansform componentatt
                                                              ached-iti
                                                                      s
                                     2
notpossi
       blet
          oremov
               eaTr
                  ansf
                     orm ort
                           ocr
                             eat
                               eaGameObj
                                       ectwi
                                           thoutone.
Const
    rai
      nts
AConstr
      aintcomponentli
                    nkst
                       heposit
                             ion,
                                rot
                                  ati
                                    on,
                                      orscaleofaGameObj
                                                      ectt
                                                         oanother
GameObject.Aconst
                rai
                  nedGameObjectmoves,
                                    rot
                                      ates,
                                          orscal
                                               esli
                                                  ket
                                                    heGameObj
                                                            ectiti
                                                                 s
l
inkedt
     o.
Rot
  ati
    onandOr
          ient
             ati
               oni
                 nUni
                    ty
Rotati
     onsin3Dappli
                cati
                   onsareusuall
                              yrepr
                                  esentedinoneoft
                                                woway s,Quaterni
                                                               onsorEul
                                                                      er
angles.Eachhasi
              tsownusesanddr awbacks.Unit
                                        yusesQuat
                                                erni
                                                   onsinternal
                                                             ly,
                                                               butshows
val
  uesoft heequi
              val
                entEul
                     erangl
                          esi nthei
                                  nspectortomakei
                                                teasyfory outoedit
                                                                 .
Li
 ght
   s
Li
 ght
   sareanessent
              ial
                par
                  tofever
                        yscene.Whi
                                 l
                                 emeshesandt
                                           extur
                                               esdefi
                                                    net
                                                      heshapeand
l
ookofascene,
           li
            ght
              sdefi
                  nethecol
                         orandmoodofy
                                    our3Denvi
                                            ronment
                                                  .
Camer
    as
Justascamer asareusedinf i
                         l
                         mst odispl
                                  aythest
                                        orytotheaudience,CamerasinUnit
                                                                     yare
usedtodisplaythegamewor ldtotheplay
                                  er.Youwil
                                          lal
                                            wayshav eatleastonecameraina
scene,butyoucanhav emor ethanone.Mult
                                    ipl
                                      ecamerascangiv eyouatwo-pl
                                                               ayerspl
                                                                     it
                                                                      screen
orcreateadvancedcustom eff
                         ects.Youcananimat
                                         ecamer as,
                                                  orcont r
                                                         olthem wi
                                                                 thphysi
                                                                       cs.
Cr
 oss-
    Plat
       for
         m Consi
               der
                 ati
                   ons
MostofUnity’
           sAPIandpr oj
                      ectstructur
                                eisident
                                       icalf
                                           orall
                                               support
                                                     edpl
                                                        atf
                                                          ormsandinsome
casesaprojectcansimpl
                    yber ebuil
                             ttorunondiffer
                                          entdevi
                                                ces.Howev
                                                        er,
                                                          fundament
                                                                  al
dif
  fer
    encesinthehardwareanddepl oymentmethodsmeant hatsomepar
                                                          tsofaproj
                                                                  ectmay
notportbet
         weenpl at
                 for
                   mswi thoutchange.
Publ
   i
   shi
     ngBui
         l
         ds
Atanytimewhileyouarecreat
                        ingyourgame,youmightwanttoseehowi tl
                                                           ookswhenyou
buil
   dandrunitoutsi
                deoftheeditorasastandal
                                      one.Fi
                                           l
                                           e>BuildSetti
                                                      ngs…isthemenuitem to
accesstheBuil
            dSetti
                 ngswindow.Itpopsupaneditabl
                                           eli
                                             stofthescenesthatwi
                                                               l
                                                               lbeincluded
wheny oubui
          ldyourgame.
2D
Gamepl
     ayi
       n2D
Whi
  lefamousfori
             ts3Dcapabil
                       i
                       ties,Uni
                              tycanal
                                    sobeusedt
                                            ocreat
                                                 e2Dgames.Thef
                                                             amil
                                                                i
                                                                ar
f
unct
   ionsoft
         heeditorar
                  esti
                     l
                     lavailabl
                             ebutwit
                                   hhel
                                      pful
                                         addi
                                            ti
                                             onstosi
                                                   mpl
                                                     if
                                                      y2Ddevel
                                                             opment
                                                                  .
                                     3
Themosti mmediat
               elynot
                    iceabl
                         ef eat
                              ureisthe2Dv iewmodebut  t
                                                      oninthetool
                                                                baroftheScene
view.When2Dmodei senabled,anorthographi
                                      c(ie,perspect
                                                  ive-
                                                     fr
                                                      ee)vi
                                                          ewwi l
                                                               lbeset;
                                                                     the
cameralooksal
            ongtheZaxi swiththeYaxi si
                                     ncreasingupwards.Thi
                                                        sallowsyoutovisual
                                                                         i
                                                                         se
thesceneandpl
            ace2Dobj ectseasil
                             y.
2Dgr
   aphi
      cs
Graphicobject
            sin2Dar eknownasSpr  i
                                 tes.Sprit
                                         esareessent
                                                   ial
                                                     l
                                                     yj uststandardtext
                                                                      uresbut
therearespeci
            altechni
                   quesforcombi ni
                                 ngandmanagi  ngspri
                                                   tetexturesforeff
                                                                  ici
                                                                    encyand
convenienceduri
              ngdevelopment.Unityprovidesabuilt
                                              -i
                                               nSpri
                                                   teEditortoletyouextractspri
                                                                             te
graphi
     csf r
         om alargeri
                   mage.Thisallowsy out oeditanumberofcomponenti mageswi  t
                                                                          hina
singl
    etexturei
            nyourimageeditor.Youcoul duset hi
                                            s,f
                                              orexample,tokeept hearms, l
                                                                        egsand
bodyofachar act
              erasseparateelement swithinoneimage.
2Dphy
    sics
Uni
  tyhasaseparatephysicsengineforhandli
                                     ng2Dphysi
                                             cssoastomakeuseof
opt
  imizat
       ionsonl
             yavail
                  ablewith2D.Thecomponentscorr
                                             espondtothestandar
                                                              d3Dphysi
                                                                     cs
componentssuchasRigidbody,BoxColl
                                iderandHi
                                        ngeJoint
                                               ,butwi
                                                    th“2D”appendedt
                                                                  othe
name.
Gr
 aphi
    csOv
       erv
         iew
Li
 ght
   ing
Inordertocalcul
              atetheshadi
                        ngofa3Dobj  ect,Unit
                                           yneedstoknowt heintensi
                                                                 ty,
                                                                   dir
                                                                     ecti
                                                                        onand
colorofthel
          ightthatfal
                    lsoni
                        t.Bydefault
                                  ,li
                                    ghtsinUnity-dir
                                                  ecti
                                                     onal
                                                        ,spotandpoi nt
                                                                     ,are
realt
    ime.Thi
          smeanst  hatt
                      heycontr
                             ibutedirectli
                                         ghttothesceneandupdat eever
                                                                   yframe.As
l
ightsandGameObj  ect
                   saremov edwithi
                                 nthescene, li
                                             ghti
                                                ngwill
                                                     beupdat edimmediatel
                                                                        y.Thi
                                                                            s
canbeobser vedinboththesceneandgamev   i
                                       ews.
Camer
    as
AUni
   tysceneiscreatedbyarr
                       angi
                          ngandmov ingobj
                                        ect
                                          sinat
                                              hree-
                                                  dimensi
                                                        onalspace.Si
                                                                   nce
t
hevi
   ewer’sscr
           eeni stwo-
                    dimensi
                          onal,
                              ther
                                 eneedstobeawaytocaptur
                                                      eav i
                                                          ewand“ fl
                                                                  att
                                                                    en”i
                                                                       t
f
ordi
   spl
     ay.Thisisaccompli
                     shedusingCameras.
Acamer aisanobjectthatdefinesav  i
                                 ewinscenespace.Theobj ect’
                                                          spositi
                                                                ondefinesthe
vi
 ewpoint,whil
            etheforward(Z)andupwar   d(Y)axesoftheobjectdefi
                                                           nethev i
                                                                  ewdi r
                                                                       ectionand
t
het opofthescreen,respect
                        ivel y.TheCamer acomponentalsodefinesthesizeandshapeof
t
her egi
      onthatfall
               swithinthev iew.Wi t
                                  htheseparameterssetup,thecamer acandisplaywhat
i
tcurrent
       ly“sees”t
               othescr een.Ast  hecameraobjectmov esandrotates,t
                                                               hedispl
                                                                     ay edv i
                                                                            ew
wil
  lalsomov eandrotateaccor dingly.
Mat
  eri
    als,
       Shader
            s&Text
                 ures
                                       4
    Mater
         ial
           sdef i
                nehowasurf
                         aceshouldberendered,
                                            byincl
                                                 udi
                                                   ngrefer
                                                         encestot
                                                                he
     Text
        uresituses,
                  til
                    i
                    ngi
                      nfor
                         mati
                            on,Colort
                                    int
                                      sandmor e.Theavai
                                                      labl
                                                         eopti
                                                             onsfora
     Mater
         ialdependonwhi
                      chShadertheMateri
                                      alisusi
                                            ng.
    Shadersaresmall
                   scr
                     ipt
                       sthatcont
                               aint
                                  hemat hemat
                                            ical
                                               calcul
                                                    ati
                                                      onsandalgori
                                                                 thmsf
                                                                     or
     cal
       culat
           ingtheCol
                   orofeachpi
                            xelr
                               endered,
                                      basedontheli
                                                 ghti
                                                    nginputandtheMater
                                                                     ial
     confi
         gurat
             ion.
    Text
        uresarebit
                 mapimages.AMateri
                                 alcancontai
                                           nrefer
                                                encestot
                                                       extures,
                                                              sothatt
                                                                    he
     Mater
         ial
           ’sShadercanuset
                         hetext
                              ureswhil
                                     ecalcul
                                           ati
                                             ngthesurf
                                                     acecolorofa
     GameObject.
Vi
 deoov
     erv
       iew
UseUnity
       ’svi
          deosy
              stem t
                   oint
                      egr
                        atevi
                            deoint
                                 oyourgame.Vi
                                            deof
                                               ootagecanaddr
                                                           eal
                                                             i
                                                             sm,
                                                               sav
                                                                 e
onrenderi
        ngcompl
              exi
                ty,
                  orhel
                      pyouint
                            egr
                              atecont
                                    entavai
                                          l
                                          abl
                                            eext
                                               ernal
                                                   ly
                                                    .
Ter
  rai
    nEngi
        ne
Unity
    ’sTerr
         ainsyst em al
                     lowsyoutoaddv astlandscapestoyourgames.Atr unt
                                                                  ime,ter
                                                                        rai
                                                                          n
renderi
      ngishi
           ghlyopt i
                   mizedforrender
                                ingeff
                                     iciencywhil
                                               eintheedit
                                                        or,aselecti
                                                                  onoftoolsi
                                                                           s
avail
    ablet
        omaket  err
                  ainseasyandquicktocreate.Thissect
                                                  ionexpl
                                                        ainsthev ar
                                                                  iousopti
                                                                         ons
avail
    ablef
        orter
            rainsandhowt  omakeuseoft hem.
Tr
 eeEdi
     tor
Uni
  typrovi
        desatool
               cal
                 l
                 edTreeEdit
                          orthatl
                                etsyoudesi
                                         gnt
                                           reesdir
                                                 ectl
                                                    ywit
                                                       hint
                                                          heedi
                                                              tor
                                                                .Thi
                                                                   s
i
sveryuseful
          whenyouwantt
                     ocreatedetai
                                l
                                edforest
                                       sandj
                                           ungleswit
                                                   hdif
                                                      fer
                                                        enttr
                                                            eet
                                                              ypesand
var
  iat
    ions.
Par
  ti
   cl
    eSy
      stems
Hi
 ghDy
    nami
       cRangeRender
                  ing
I
nstandardrenderi
               ng,
                 thered,
                       greenandblueval
                                     uesforapi
                                             xelar
                                                 eeachrepr
                                                         esent
                                                             edbya
f
ract
   ionintherange0..
                  1,wher
                       e0r epr
                             esentszer
                                     oint
                                        ensi
                                           tyand1repr
                                                    esent
                                                        sthemaxi
                                                               mum
                                        5
i
ntensi
     tyfort
          hedispl
                aydevi
                     ce.Whi
                          l
                          ethisi
                               sstrai
                                    ght
                                      for
                                        war
                                          dtouse,
                                                itdoesn’
                                                       taccur
                                                            atel
                                                               yref
                                                                  lect
t
hewayt hatl
          ight
             ingworksi
                     nareal
                          li
                           fescene.
Lay
  ers
Layer
    saremostcommonl yusedbyCamerastor
                                    enderonl
                                           yapartofthescene,
                                                           andbyLi ghtsto
i
ll
 uminateonlypart
               soft
                  hescene.Butt
                             heycanal
                                    sobeusedbyraycasti
                                                     ngtoselect
                                                              ivel
                                                                 yignore
col
  li
   dersortocreat
               ecol
                  li
                   si
                    ons.
Phy
  sicsOv
       erv
         iew
Ri
 gidbodyov
         erv
           iew
   ARigi
        dbodyisthemaincomponentt
                               hatenabl
                                      esphysi
                                            calbehav
                                                   iourforaGameObj ect.
    Wit
      haRi gi
            dbodyat
                  tached,
                        theobj
                             ectwil
                                  li
                                   mmediatel
                                           yrespondtogravi
                                                         ty.Ifoneormore
    Col
      li
       dercomponentsareal
                        soadded,t
                                heGameObjecti
                                            smov edbyincomi ngcoll
                                                                 i
                                                                 sions.
   SinceaRigidbodycomponentt akesoverthemovementoftheGameObjecti
                                                                tisatt
                                                                     ached
    to,youshouldn’
                 ttr
                   ytomov eitfrom ascri
                                      ptbychangi
                                               ngtheTransf
                                                         orm pr
                                                              operti
                                                                   essuch
    aspositi
           onandr ot
                   ati
                     on.I
                        nstead, youshouldappl
                                            yfor
                                               cestopushtheGameObjectand
    l
    ett hephysi
              csenginecal
                        culatetheresul
                                     ts.
Col
  l
  ider
     s
   Coll
       idercomponentsdefi
                        netheshapeofanobj ectforthepurposesofphysical
    col
      li
       sions.Thesimplest(
                        andleastprocessor
                                        -i
                                         ntensi
                                              ve)coll
                                                    ider
                                                       saretheso-call
                                                                    ed
    pri
      mi t
         ivecol
              li
               derty
                   pes.In3D,thesearetheBoxCol l
                                              i
                                              der,SphereColl
                                                           i
                                                           derandCapsule
    Coll
       ider.
   I
    n2D, y
         oucanuset
                 heBoxColl
                         i
                         der2DandCir
                                   cleCol
                                        li
                                         der2D.Anynumberoft
                                                          hesecan
    beaddedt
           oasingl
                 eobj
                    ectt
                       ocreat
                            ecompoundcoll
                                        i
                                        ders.
Joi
  nts
   Youcanattachonerigi
                      dbodyobj
                             ecttoanot
                                     herort
                                          oaf  i
                                               xedpointinspaceusingaJoint
    component.General
                    ly,
                      youwantajoi
                                nttoal
                                     lowatleastsomef r
                                                     eedom ofmot ionandso
    Uni
      typrov
           idesdiff
                  erentJoi
                         ntcomponentst
                                     hatenf
                                          orcediff
                                                 erentrestr
                                                          ict
                                                            ions.
   Forexample,aHingeJoi
                       ntal
                          lowsr
                              otat
                                 ionaroundaspecifi
                                                 cpointandaxiswhil
                                                                 ea
    Spri
       ngJointkeepstheobj
                        ect
                          sapar
                              tbutlet
                                    st hedi
                                          stancebetweenthem str
                                                              etchsl
                                                                   i
                                                                   ght
                                                                     ly.
Char
   act
     erCont
          rol
            l
            ers
                                    6
    Thechar
           act
             eri
               nafir
                   st-orthi
                          rd-
                            per
                              songamewi l
                                        lof
                                          tenneedsomecol
                                                       li
                                                        sion-
                                                            based
     physi
         cssot
             hati
                tdoesn’
                      tfall
                          thr
                            oughthef
                                   loororwal
                                           kthroughwal
                                                     l
                                                     s.
    Usually
           ,though,
                  thechar
                        act
                          er’
                            saccelerat
                                     ionandmov ementwil
                                                      lnotbephy
                                                              sical
                                                                  l
                                                                  y
     reali
         sti
           c,soitmaybeabl
                        etoaccel
                               erate,brakeandchangedi
                                                    rect
                                                       ional
                                                           mostinst
                                                                  ant
                                                                    ly
     withoutbeingaf
                  fect
                     edbymomentum.
    In3Dphysi
             cs,t
                histy
                    peofbehav
                            iourcanbecreatedusingaCharact
                                                        erContr
                                                              oll
                                                                er.This
     componentgi
               vesthechar
                        act
                          erasimple,
                                   capsule-shapedcol
                                                   l
                                                   idert
                                                       hati
                                                          salwaysupright.
Phy
  sicsDebugVi
            sual
               i
               zat
                 ion
    Physi
         csDebugVisual
                     i
                     seral
                         l
                         owsyoutoquickl
                                      yinspectt
                                              heCol
                                                  l
                                                  idergeomet
                                                           ryi
                                                             nyour
     Scene,
          andprof
                il
                 ecommonphysi
                            cs-basedscenari
                                          os.
    Itpr
        ovi
          desav i
                sual
                   isat
                      ionofwhichGameObj ect
                                          sshoul
                                               dandshoul
                                                       dnotcoll
                                                              i
                                                              dewi t
                                                                   h
     eachother
             .Thisi
                  sparticul
                          arl
                            yusef
                                ulwhentherearemanyCol
                                                    li
                                                     der
                                                       sinyourScene,ori
                                                                      f
     theRenderandColl
                    isi
                      onMeshesar eoutofsync.
Scr
  ipt
    ingOv
        erv
          iew
Script
     ingisanessent i
                   ali
                     ngredientinal
                                 lgames.Eventhesimplestgameneedsscr i
                                                                    pts,t
                                                                        o
respondtoinputfrom theplayerandarrangeforevent
                                             sinthegamepl aytohappenwhent hey
should.Beyondthat,scri
                     ptscanbeusedt  ocr
                                      eategraphi
                                               caleff
                                                    ects,contr
                                                             olt
                                                               hephysical
behaviourofobj
             ect sorevenimpl ementacustom AIsyst
                                               em forcharacter
                                                             sinthegame.
Cr
 eat
   ingandUsi
           ngScr
               ipt
                 s
    Thebehavi
             orofGameObj ectsiscont
                                  roll
                                     edbytheComponentsthatar
                                                           eattachedto
     them.Al
           thoughUnity
                     ’sbuil
                          t-i
                            nComponent scanbeveryv
                                                 ersati
                                                      l
                                                      e,youwil
                                                             lsoonfindyou
     needtogobey ondwhattheycanprovidetoimpl
                                           ementyourowngameplayf eat
                                                                   ures.
     Unit
        yall
           owsy outocreat
                        ey ourownComponent susi
                                              ngscri
                                                   pts.
    Theseallowyout otr
                      iggergameevent
                                   s,modi
                                        fyComponentpropert
                                                         iesovert
                                                                imeand
     respondtouserinputinanywayyouli
                                   ke.Unl
                                        i
                                        kemostotherassets,
                                                         scri
                                                            ptsareusual
                                                                      l
                                                                      y
     createdwit
              hinUnitydir
                        ectl
                           y.
    Youcancreat
               eanewscri
                       ptfr
                          om t
                             heCr
                                eatemenuatt
                                          hetopl
                                               eftoft
                                                    hePr
                                                       ojectpanel
                                                                or
     bysel
         ect
           ingAsset
                  s>Creat
                        e>C#Scri
                               ptfr
                                  om t
                                     hemainmenu.
Var
  iabl
     esandt
          heI
            nspect
                 or
    Justl
         i
         keot
            herComponentsoft
                           enhav
                               eproper
                                     ti
                                      esthatareedit
                                                  ablei
                                                      nthei
                                                          nspect
                                                               or,
                                                                 you
     canal
         lowv
            aluesi
                 nyourscri
                         ptt
                           obeedit
                                 edfr
                                    om theInspect
                                                ortoo.
Cont
   rol
     l
     ingGameObj
              ect
                susi
                   ngcomponent
                             s
                                      7
     IntheUni
             tyEdit
                  or,youmakechangest oComponentpropert
                                                     iesusi
                                                          ngt
                                                            heInspector
                                                                      .So,
      forexampl
              e,changestotheposi
                               ti
                                onv aluesoft
                                           heTransfor
                                                    m Componentwil
                                                                 lresul
                                                                      tina
      changetotheGameObject’
                           sposi
                               tion.
     Si
       milar
           ly,
             youcanchangethecolorofaRenderer
                                           ’smater
                                                 ialort
                                                      hemassofaRigi
                                                                  dbody
      wit
        hacor r
              espondi
                    ngeff
                        ectontheappearanceorbehavi
                                                 oroftheGameObj
                                                              ect
                                                                .Forthe
      mostpart,
              scri
                 pti
                   ngisal
                        soaboutmodifyi
                                     ngComponentpr oper
                                                      ti
                                                       estomani
                                                              pul
                                                                ate
      GameObjects.
     Thedi f
            fer
              ence,though,i
                          sthatascriptcanvaryaproper
                                                   ty’
                                                     sval
                                                        uegradual
                                                                lyovert
                                                                      imeor
      i
      nr esponsetoinputfrom t
                            heuser.Bychanging,cr
                                               eati
                                                  nganddest
                                                          royingobj
                                                                  ectsatt
                                                                        he
      ri
       ghttime,anykindofgameplaycanbei  mpl
                                          emented.
Ev
 entFunct
        ions
     Ascripti
             nUnityi
                   snotli
                        kethetradi
                                 ti
                                  onali
                                      deaofapr ogr
                                                 am wherethecoderuns
      cont
         inuousl
               yinaloopunti
                          litcomplet
                                   esit
                                      st ask.I
                                             nst
                                               ead,Uni
                                                     typassescont
                                                                rolt
                                                                   oascr
                                                                       ipt
      i
      nter
         mi tt
             ent
               lybycal
                     li
                      ngcertai
                             nfuncti
                                   onsthataredecl
                                                aredwi
                                                     thini
                                                         t.
     Onceaf unct
                ionhasfi
                       nishedexecut
                                  ing,cont
                                         rol
                                           ispassedbackt
                                                       oUni t
                                                            y.Thesef
                                                                   uncti
                                                                       ons
      areknownasev entf
                      unctionssi
                               ncetheyareacti
                                            vat
                                              edbyUnityi
                                                       nresponsetoevent
                                                                      sthat
      occurduri
              nggameplay.
Cr
 eat
   ingandDest
            roy
              ingGameObj
                       ect
                         s
     Somegameskeepaconstantnumberofobj
                                      ectsint
                                            hescene,
                                                   butiti
                                                        sver
                                                           ycommonf or
      char
         act
           ers,
              treasur
                    esandot
                          herobj
                               ecttobecreat
                                          edandremovedduri
                                                         nggamepl
                                                                ay.
     InUni
          ty,
            aGameObjectcanbecr
                             eat
                               edusi
                                   ngt
                                     heI
                                       nst
                                         ant
                                           iat
                                             efunct
                                                  ionwhi
                                                       chmakesanew
      copyofanexi
                sti
                  ngobj
                      ect.
publ
   i
   cGameObj
          ectenemy
                 ;
v
oidSt
    art
      (){
 f
 or(
   inti
      =0;
        i<5;
           i++){
    I
    nst
      ant
        iat
          e(enemy
                );
Scr
  iptcompi
         l
         ati
           onandassembl
                      ydef
                         ini
                           ti
                            onf
                              il
                               es
     Uni
        tyautomat
                ical
                   l
                   ydefi
                       neshowscript
                                  scompilet
                                          omanagedassembl i
                                                          es.Ty
                                                              pical
                                                                  l
                                                                  y,
      compil
           ati
             onti
                mesintheUni
                          tyEdi
                              torfori
                                    ter
                                      ati
                                        vescr
                                            iptchangesi
                                                      ncr
                                                        easeasyouadd
                                     8
     mor
       escr
          ipt
            stot
               hePr
                  oject
                      .
   Useanassembl ydefi
                     nit
                       ionf
                          il
                           etodef i
                                  ney ourownmanagedassembl   iesbasedupon
    scr
      iptsi
          nsideafolder
                     .Todothis,separat
                                     ePr ojectscri
                                                 ptsintomult
                                                           ipleassembli
                                                                      eswith
    wel
      l-def
          ineddependenci
                       esinordertoensur ethatonlyrequir
                                                      edassembl i
                                                                esarerebui
                                                                         l
                                                                         t
    whenmaki ngchangesinascri
                            pt.Thisreducescompi lati
                                                   ontime.Thinkofeach
    managedassembl yasasingl
                           elibrar
                                 ywi t
                                     hintheUni t
                                               yPr oj
                                                    ect.
Scr
  ipt
    ingTool
          s
Consol
     eWi
       ndow
TheConsoleWindow(menu:Window>Gener al
                                    >Consol
                                          e)showser r
                                                    ors,warningsandot
                                                                    her
messagesgenerat
              edbyUnity
                      .Toaidwithdebuggi
                                      ng,
                                        youcanalsoshowy  ourownmessagesin
theConsol
        eusingtheDebug.
                      Log,Debug.
                               LogWarni
                                      ngandDebug.LogErrorfuncti
                                                              ons.
Thetoolbaroftheconsolewindowhasanumberofopti
                                           onsthataffecthowmessagesare
displ
    ayed.TheClearbutt
                    onremovesanymessagesgener
                                            atedfrom yourcodebutr
                                                                etai
                                                                   ns
compilerer
         ror
           s.Youcanar r
                      angefortheconsol
                                     etobecl
                                           earedautomatical
                                                          l
                                                          ywheneveryour
                                                                      un
thegamebyenabl ingtheCl
                      earOnPlayopti
                                  on.
LogFi
    l
    es
Theremi ghtbetimesduri
                     ngdev el
                            opmentwheny  ouneedt
                                               oobt ai
                                                     ninfor
                                                          mat i
                                                              onfr
                                                                 om thelogsof
thestandaloneplayery
                   ou’
                     v ebui
                          lt,
                            thetargetdev
                                       ice,ort
                                             heEdit
                                                  or.Usuall
                                                          yyouneedtoseet hese
fi
 leswheny  ouhaveexper
                     iencedaproblem, t
                                     ofi
                                       ndoutexactl
                                                 ywher etheprobl
                                                               em occur
                                                                      red.
Uni
  tyTestRunner
TheUnit
      yTestRunneri
                 satoolt
                       hatt
                          estsyourcodeinbot
                                          hEdi
                                             tmodeandPl
                                                      aymode,
                                                            andal
                                                                so
ontar
    getpl
        atf
          ormssuchasStandal
                          one,Andr
                                 oid,ori
                                       OS.
Toaccesst
        heUni
            tyTestRunner
                       ,got
                          oWi
                            ndow>Gener
                                     al>TestRunner
                                                 .
I
L2CPP
IL2CPP( I
        ntermediateLanguageToC++)i saUni ty
                                          -dev
                                             elopedscri
                                                      ptingbackendwhichyoucan
useasanal ternati
                vetoMonowhenbui  l
                                 dingprojectsf
                                             orvari
                                                  ousplatfor
                                                           ms.Whenbui l
                                                                      dinga
projectusi
         ngIL2CPP, Unit
                      yconvert
                             sILcodef rom scri
                                             ptsandassembl i
                                                           est oC++,bef
                                                                      ore
creati
     nganat i
            v ebi
                naryfil
                      e(.
                        exe,apk,
                               .xap,forexample)foryourchosenplatf
                                                                orm.Someofthe
                                      9
usesforI
       L2CPPincl
               udei
                  ncr
                    easi
                       ngt
                         heper
                             for
                               mance,
                                    secur
                                        it
                                         y,andpl
                                               atf
                                                 orm compat
                                                          ibi
                                                            l
                                                            ityofy
                                                                 our
Unit
   yproj
       ects.
Ev
 entSy
     stem
TheEventSyst
           em isawayofsendi
                          ngevent
                                stoobj
                                     ect
                                       sintheappli
                                                 cati
                                                    onbasedoni
                                                             nput,
                                                                 beit
key
  board,mouse,touch,
                   orcust
                        om i
                           nput
                              .TheEv
                                   entSyst
                                         em consi
                                                stsofafewcomponent
                                                                 sthat
workt
    ogethertosendevent
                     s.
Ov
 erv
   iew
WhenyouaddanEv  entSyst
                      em componenttoaGameObj ecty
                                                ouwi l
                                                     lnoticet
                                                            hati
                                                               tdoesnot
hav
  emuchf uncti
             onalit
                  yexposed,t
                           hisi
                              sbecausetheEventSystem i
                                                     tsel
                                                        fisdesi
                                                              gnedasa
managerandfaci
             li
              tatorofcommunicat
                              ionbetweenEventSyst
                                                em modul es.
Thepr
    imar
       yrol
          esoft
              heEv
                 entSy
                     stem ar
                           easf
                              oll
                                ows:
  1.Managewhi
            chGameObj
                    ecti
                       sconsi
                            der
                              edsel
                                  ect
                                    ed
  2.Managewhi
            chI
              nputModul
                      eisi
                         nuse
  3.ManageRay
            cast
               ing(
                  ifr
                    equi
                       red)
  4.Updat
        ingal
            lInputModul
                      esasr
                          equi
                             red
Ani
  mat
    ion 
Ani
  mat
    ionSy
        stem Ov
              erv
                iew
Uni
  tyhasari
         chandsophi
                  sti
                    cat
                      edani
                          mat
                            ionsy
                                stem (
                                     somet
                                         imesr
                                             efer
                                                redt
                                                   oas‘
                                                      Mecani
                                                           m’)
                                                             .It
pr
 ovides:
   Easywor
          kfl
            owandset
                   upofani
                         mat
                           ionsf
                               oral
                                  lel
                                    ement
                                        sofUni
                                             tyi
                                               ncl
                                                 udi
                                                   ngobj
                                                       ect
                                                         s,
    char
       act
         ers,
            andpr
                oper
                   ti
                    es.
   Suppor
         tfori
             mpor
                tedani
                     mat
                       ioncl
                           i
                           psandani
                                  mat
                                    ioncr
                                        eat
                                          edwi
                                             thi
                                               nUni
                                                  ty
   Humanoidanimat
                 ionret
                      arget
                          ing-t
                              heabi
                                  l
                                  ityt
                                     oappl
                                         yani
                                            mat
                                              ionsf
                                                  rom onechar
                                                            act
                                                              er
    modelontoanot
                her.
   Si
     mpl
       i
       fiedwor
             kfl
               owf
                 oral
                    i
                    gni
                      ngani
                          mat
                            ioncl
                                i
                                ps.
   Conveni
          entprevi
                 ewofanimat
                          ionclips,t
                                   ransi
                                       ti
                                        onsandint
                                                eracti
                                                     onsbetweent
                                                               hem.Thi
                                                                     s
    all
      owsanimatorstoworkmor
                          ei ndependentl
                                       yofpr
                                           ogrammer s,pr
                                                       otot
                                                          ypeandpr
                                                                 evi
                                                                   ew
    thei
       rani
          mationsbefor
                     egameplaycodei shookedi
                                           n.
   Managementofcompl
                    exi
                      nter
                         act
                           ionsbet
                                 weenani
                                       mat
                                         ionswi
                                              thav
                                                 isual
                                                     progr
                                                         ammi
                                                            ng
                                   10
     t
     ool
       .
   Ani
      mat
        ingdi
            ff
             erentbodypar
                        tswi
                           thdi
                              ff
                               erentl
                                    ogi
                                      c.
   Lay
      eri
        ngandmaski
                 ngf
                   eat
                     ures
Ani
  mat
    ionCl
        i
        ps
   Animat
         ionCli
              psareoneoft hecoreelement
                                      stoUnity
                                             ’sani
                                                 mationsystem.Uni
                                                                ty
    suppor
         tsimport
                inganimati
                         onfrom exter
                                    nal
                                      sources,
                                             andoffer
                                                    st heabil
                                                            i
                                                            tyt
                                                              ocreat
                                                                   e
    ani
      mationcl
             ipsfrom scr
                       atchwithi
                               ntheedit
                                      orusingt
                                             heAnimationwindow.
Ani
  mat
    orCont
         rol
           l
           ers
   AnAnimatorContr
                  oll
                    eral
                       lowsy
                           outoar
                                rangeandmai
                                          ntai
                                             nasetofani
                                                      mat
                                                        ionsf
                                                            ora
    char
       acterorot
               herani
                    matedGameObj
                               ect.
   Thecont r
            oll
              erhasreferencestotheanimat i
                                         oncli
                                             psusedwithi
                                                       nit
                                                         ,andmanagest he
    var
      iousanimat i
                 onstatesandt hetr
                                 ansit
                                     ionsbetweenthem usi
                                                       ngaso-cal
                                                               ledStat
                                                                     e
    Machine,whichcouldbet houghtofasaki ndoffl
                                             ow-char
                                                   t,orasi
                                                         mpleprogram wri
                                                                       tt
                                                                        en
    i
    nav isualprogr
                 ammi nglanguagewi t
                                   hinUnity.
Ti
 mel
   i
   ne
UseUnity
       ’sTimeli
              netocreateci
                         nematiccontent
                                      ,game-pl
                                             aysequences,audiosequences,and
complexpart
          icl
            eeffect
                  s.Eachcut-
                           scene,ci
                                  nematic,
                                         orgame-pl
                                                 aysequencet hatyoucr eat
                                                                        e
withUni
      ty’
        sTimeli
              neconsistsofaTimeli
                                neAssetandaTi meli
                                                 neinstance.TheTimelineEdit
                                                                          or
windowcreat
          esandmodi fi
                     esTimeli
                            neAssetsandTi meli
                                             nei
                                               nstancessimultaneousl
                                                                   y.
Foreachcut
         -scene,
               cinemat
                     ic,
                       orgame-
                             playsequence,
                                         theTi
                                             mel
                                               i
                                               neEdi
                                                   torwi
                                                       ndowsav
                                                             est
                                                               he
fol
  l
  owing:
   Timel
        ineAsset
               :st
                 oresthetr
                         acks,
                             cli
                               ps,andrecor
                                         dedanimati
                                                  onswit
                                                       houtl
                                                           i
                                                           nkstothe
    speci
        fi
         cGameObjectsbei
                       nganimated.TheTimel
                                         ineAsseti
                                                 ssavedtot
                                                         heproj
                                                              ect
                                                                .
   Ti
     mel
       i
       nei
         nstance:stor
                    esli
                       nkstot
                            hespeci
                                  fi
                                   cGameObj ect
                                              sbei
                                                 ngani
                                                     mat edbyt
                                                             he
    Ti
     mel
       i
       neAsset.Theseli
                     nks,
                        ref
                          err
                            edt
                              oasbi ndi
                                      ngs,
                                         aresavedt
                                                 othescene.
Ti
 mel
   i
   neAsset
   TheTi
        mel
          i
          neEdi
              torwi
                  ndowsav
                        est
                          rackandcl
                                  i
                                  pdef
                                     ini
                                       ti
                                        onsasaTi
                                               mel
                                                 i
                                                 neAsset
                                                       .
   Ifyourecor
             dkeyani
                   mat
                     ionswhi
                           l
                           ecreat
                                ingyourcinemati
                                              c,cut-
                                                   scene,
                                                        orgame-pl
                                                                ay
    sequence,t
             heTimel
                   i
                   neEdit
                        orwi
                           ndowsavestherecordedanimati
                                                     onaschil
                                                            drenoft
                                                                  he
                                    11
     Ti
      mel
        i
        neAsset
              .
Ti
 mel
   i
   nei
     nst
       ance
   Alt
      houghaTimeli
                 neAssetdefi
                           nesthetr
                                  acksandcli
                                           psforacut-
                                                    scene,
                                                         cinemat
                                                               ic,or
    game-pl
          aysequence,
                    youcannotaddaTimeli
                                      neAssetdir
                                               ect
                                                 lytoascene.Toanimate
    GameObject
             sinyourscenewit
                           haTi mel
                                  ineAsset
                                         ,youmustcreat
                                                     eaTimel i
                                                             nei
                                                               nstance.
   TheTimeli
            neEdi
                torwi
                    ndowprovi
                            desanaut
                                   omat
                                      edmet
                                          hodofcr
                                                eat
                                                  ingaTi
                                                       mel
                                                         i
                                                         ne
    i
    nstancewhil
              ecr
                eati
                   ngaTimeli
                           neAsset
                                 .
Mul
  ti
   play
      erandNet
             wor
               king
Ther
   ear
     etwoki
          ndsofuser
                  sfort
                      heNet
                          wor
                            kingf
                                eat
                                  ure:
  1.Usersmaki
            ngaMul t
                   ipl
                     ayergamewit
                               hUnit
                                   y.Theseuser
                                             sshoul
                                                  dst
                                                    artwi
                                                        tht
                                                          he
    Networ
         kManagerortheHighLev
                            elAPI.
  2.Usersbui
           ldi
             ngnet
                 wor
                   kinf
                      rast
                         ructur
                              eoradv
                                   ancedmul
                                          ti
                                           play
                                              ergames.Theseuser
                                                              s
    shouldst
           artwi
               tht
                 heNet
                     workTranspor
                                tAPI
                                   .
Hi
 ghl
   evel
      scr
        ipt
          ingAPI
   Unity’
         snet
            wor ki
                 nghasa“ hi
                          gh-
                            lev
                              el”scri
                                    pti
                                      ngAPI( whi
                                               chwe’l
                                                    lref
                                                       ertoastheHLAPI
                                                                    ).
    Usingthi
           smeansy ougetaccesstocommandswhi  chcovermostofthecommon
    requir
         ementsformult
                     iusergameswithoutneedingtowor
                                                 ryaboutthe“l
                                                            owerl
                                                                evel
                                                                   ”
    i
    mpl ementat
              iondet
                   ail
                     s.TheHLAPIallowsy outo:
       o Cont
            rol
              thenet
                   wor
                     kedst
                         ateoft
                              hegameusi
                                      nga“
                                         Net
                                           wor
                                             kManager
                                                    ”.
       o Sendandr
                ecei
                   venet
                       wor
                         kmessages.
       o Sendnet
               wor
                 kedcommandsf
                            rom cl
                                 i
                                 ent
                                   stoser
                                        ver
                                          s.
       o Maker
             emot
                epr
                  ocedur
                       ecal
                          l
                          s(RPCs)f
                                 rom ser
                                       ver
                                         stocl
                                             i
                                             ent
                                               s.
       o Sendnet
               wor
                 kedev
                     ent
                       sfr
                         om ser
                              ver
                                stocl
                                    i
                                    ent
                                      s.
TheNet
     wor
       kManager
   TheNet workManageri
                      sresponsi
                              blef
                                 ormanagi
                                        ngthenet
                                               wor
                                                 kingaspect
                                                          sofyour
    multi
        playergame.Youshoul
                          dhaveone(andonl
                                        yone)Net
                                               wor
                                                 kManageracti
                                                            veinyour
    Sceneatat ime.
Engi
   neandEdi
          tori
             ntegr
                 ati
                   on
                                  12
   Uni
      ty’
        snetworki
                ngi
                  sint
                     egrat
                         edi
                           ntot
                              heengineandtheedit
                                               or,
                                                 all
                                                   owi
                                                     ngy
                                                       out
                                                         owor
                                                            kwi
                                                              th
    componentsandvi
                  sual
                     aidst
                         obui
                            ldyourmult
                                     ipl
                                       ayergame.
I
nter
   netSer
        vices
   Uni
      tyof
         fer
           sInt
              ernetSer
                     vicest
                          osuppor
                                tyourgamet
                                         hroughoutpr
                                                   oduct
                                                       ionandr
                                                             elease
UI
Canv
   as
   TheCanvasist
               heareat
                     hatal
                         lUIel
                             ementsshoul
                                       dbeinsi
                                             de.TheCanv
                                                      asisaGame
    Objectwi
           thaCanv
                 ascomponentoni
                              t,andal
                                    lUIel
                                        ementsmustbechi
                                                      ldr
                                                        enofsucha
    Canvas.
   Creat
        inganewUIelement
                       ,suchasanImageusingthemenuGameObject>UI>Image,
    automati
           cal
             l
             ycreat
                  esaCanvas,i
                            fther
                                eisn’
                                    tal
                                      readyaCanvasi
                                                  nthescene.TheUI
    el
     ementiscreat
                edasachil
                        dtothi
                             sCanvas.
   TheCanv
          asar
             eai
               sshownasar
                        ect
                          angl
                             eint
                                heSceneVi
                                        ew.
Vi
 sual
    Component
            s
   Witht
        hei
          ntr
            oduct
                ionoft
                     heUIsy st
                             em,newComponent
                                           shav
                                              ebeenaddedt
                                                        hatwi
                                                            l
                                                            lhel
                                                               p
    youcr
        eat
          eGUIspeci
                  fi
                   cfunct
                        ional
                            it
                             y.
                                 13
      Text
      I
       mage
      RawI
          mage
I
nter
   act
     ionComponent
                s
   Thiscov
          er scomponentsintheUIsy
                                stem t
                                     hathandlesinteract
                                                      ion,
                                                         suchasmouseor
    toucheventsandi
                  nteract
                        ionusi
                             ngakeyboardorcontr
                                              oller.
Ri
 chText
   Thet
       extforUIel
                ement
                    sandtextmeshescanincorpor
                                            atemult
                                                  ipl
                                                    ef ontst
                                                           ylesandsi
                                                                   zes.
    Ri
     chtexti
           ssupport
                  edbot
                      hfortheUISyst
                                  em andthelegacyGUIsystem.
Nav
  igat
     ionandPat
             hfi
               ndi
                 ng
Nav
  igat
     ionSy
         stem i
              nUni
                 ty
   TheNav i
           gati
              onSystem al
                        lowsyoutocreatecharacter
                                               swhichcannavi
                                                           gat
                                                             ethegame
    world.I
          tgiv
             esyourcharacter
                           stheabi
                                 li
                                  tytounderstandthatt
                                                    heyneedt
                                                           otakest
                                                                 air
                                                                   sto
    reachsecondfl
                oor,
                   ortojumpt ogetoveraditch.
   NavMesh( shortf
                  orNav
                      igat
                         ionMesh)i
                                 sadatastr
                                         ucturewhichdescr
                                                        ibesthewalkable
    surf
       acesoft hegameworl
                        dandall
                              owstof
                                   indpathfrom onewalkabl
                                                        elocati
                                                              onto
    anotherint
             hegamewor l
                       d.Thedat
                              astr
                                 uct
                                   ureisbuil
                                           t,orbaked,
                                                    automati
                                                           call
                                                              yfr
                                                                om y our
    l
    evel geometry
                .
                                  14
I
nnerWor
      kingsoft
             heNav
                 igat
                    ionSy
                        stem
   Wheny ouwanttointel
                      li
                       gent
                          lymovecharactersinyourgame(oragent
                                                           sastheyare
    cal
      ledi
         nAIcircl
                es),y
                    ouhav etosol
                               vetwopr oblems:howtoreasonaboutt
                                                              helev
                                                                  elto
    fi
     ndthedest
             inati
                 on,thenhowtomov ethere.
Bui
  l
  dingaNav
         Mesh
   Thepr
        ocessofcr
                eat
                  ingaNav
                        Meshf
                            rom t
                                hel
                                  evel
                                     geomet
                                          ryi
                                            scal
                                               l
                                               edNav
                                                   MeshBaki
                                                          ng.
   Theprocesscoll
                 ect
                   stheRenderMeshesandTer rai
                                            nsofal
                                                 lGameObj
                                                        ectswhi
                                                              chare
    markedasNav i
                gati
                   onStati
                         c,andthenpr
                                   ocessesthem t
                                               ocreat
                                                    eanav
                                                        igati
                                                            onmeshthat
    appr
       oximatesthewalkabl
                        esurfacesoft
                                   helevel
                                         .
AssetSt
      orePubl
            i
            shi
              ng
AssetSt
      orePubl
            i
            sherAdmi
                   nist
                      rat
                        ion
Set
  ti
   ngupaPubl
           i
           sheraccount
                                  15
   Opent
        heAssetSt
                ore,
                   signi
                       n,anddownl
                                oadt
                                   hel
                                     atestv
                                          ersi
                                             onofAssetSt
                                                       oreTool
                                                             s.
   Oncedownl
            oadedandimpor
                        tedt
                           oyourpr
                                 oject
                                     ,youshoul
                                             dseet
                                                 he“
                                                   AssetSt
                                                         oreTool
                                                               s”
    menuappeari
              nyourTool
                      bar
                        .
   Scrol
        ldownandcli
                  ckthePackageManagerbut
                                       ton.Wi
                                            ththePackageManageropen,
    cl
     ickthel
           inki
              nthetopri
                      ght
                        -handcor
                               nerthatr
                                      eadsPubl
                                             isheraccount
                                                        .
   Thi
      sbr
        ingsupawi
                ndowt
                    hatpr
                        ompt
                           syout
                               ocr
                                 eat
                                   eyourPubl
                                           i
                                           sherAccount
                                                     .
   Youneedtofi
              ll
               outyourname, publ
                               isherURL,
                                       publ
                                          isherdescri
                                                    pti
                                                      on(incl
                                                            udi
                                                              nganemai
                                                                     l
    suppor
         taddr
             essforyourpackages)andkeyimages.Oncey ou’
                                                     redone,hi
                                                             tSav
                                                                e.
AssetSt
      orePubl
            i
            shi
              ngGui
                  de
Cr
 eat
   inganewpackage
   Thefir
         stthi
             ngy ouwantt
                       odoi fyouarer
                                   eadytosubmitanasseti
                                                      stocreat
                                                             eadraf
                                                                  tfor
    yourpackage.GotothePackagestabofyourPubl
                                           i
                                           sherAdmini
                                                    str
                                                      ati
                                                        onpageandcl
                                                                  i
                                                                  ck
    thebutt
          on“ Cr
               eateNewPackage”
Upl
  oadi
     ngapackage
   Topreventconf
                usionduri
                        ngupl oadandimpor tforyouruser
                                                     s,makesurethaty
                                                                   our
    submissi
           oncontentisi
                      nsideat op-
                                levelf
                                     olderthathasthesametit
                                                          leasyour
    submissi
           on.Thi
                sf ol
                    dercontainsal
                                l oft
                                    hecomponent  sf
                                                  oryourPr
                                                         oject
                                                             :Touploadyour
    AssettothePubl
                 isherAdministr
                              ati
                                onpor t
                                      al:
     1.I
       ntheUni
             tyEdi
                 tor
                   ,impor
                        ttheAssetSt
                                  oreTool
                                        sint
                                           oyourPr
                                                 oject
                                                     .
     2.Got
         oAssetSt
                oreTool
                      s>PackageUpl
                                 oad.
     3.EnteryourUni
                  tyPubl
                       isheraccounti
                                   nfor
                                      mati
                                         onint
                                             othisbox.ThePackageUpl
                                                                  oad
       toolfet
             chesyourdr
                      aftsandpackagesviay
                                        ourPubli
                                               sherPort
                                                      al.
     4.Selectt
             hef
               oldert
                    hatcontainsyourent
                                     ir
                                      ePr
                                        oject
                                            ,andt
                                                hensel
                                                     ectanAssett
                                                               o
       showcasewit
                 hinthatPr
                         oject.
     5.Cli
         ckUploadtoconnecty
                          ourAssetstoyourPubl
                                            isherPor
                                                   tal
                                                     .Thestat
                                                            usbarnextt
                                                                     o
       theti
           tl
            eofyoursel
                     ectedfol
                            dershowstheprogr
                                           essoftheupload.
XR
Virt
   ualr
      eal
        i
        t y(
           VR),
              whichcanbereferr
                             edtoasi  mmersi
                                           v emulti
                                                  mediaorcomputer-
                                                                 simul
                                                                     ated
real
   it
    y,r
      epl
        icat
           esanenvi
                  ronmentthatsimulatesaphysicalpr
                                                esenceinplacesi
                                                              nthereal
                                                                     wor l
                                                                         d
oranimagi
        nedworld,
                all
                  owingtheusertointeracti
                                        nthatworld.
Wit
  hVR,usersexperi
                encearti
                       fi
                        cial
                           soundsandsight
                                        sandf eel
                                                asi
                                                  fthey’
                                                       rei
                                                         nadigi
                                                              tal
                                                                worl
                                                                   d.
I
magineopeni
          ngy oureyesandseeingacomputer-
                                       gener
                                           atedworl
                                                  dallar
                                                       oundy
                                                           ou;youcan
                                    16
mov
  eint
     hisenv
          ironmentandev
                      eni
                        nter
                           actwi
                               thi
                                 t.That
                                      ’swhatv
                                            irt
                                              ual
                                                real
                                                   i
                                                   tyi
                                                     sli
                                                       ke.
Speci
    alVRheadset
              sar
                eusedt
                     oimmer
                          seuser
                               sinv
                                  irt
                                    ual
                                      real
                                         i
                                         ty.Ther
                                               ear
                                                 etwomai
                                                       nty
                                                         pesofVR
headset
      s:
  1.PC-
      connect
            edheadset
                    s
     Asthei
          rnamesuggests,
                       theseVRheadsetsareconnect edt
                                                   oacomput er(oragami
                                                                     ng
     consol
          e)t
            hatgener
                   ateshigh-
                           qual
                              it
                               yvir
                                  tualexperi
                                           ences.Theprocessi
                                                           ngpowerof
     moderncomputer
                  sishuge,sotheycangeneratereal
                                              ist
                                                icandpersuasi
                                                            vedigi
                                                                 tal
                                                                   wor
                                                                     lds.
  2.St
     andal
         oneheadset
                  s
     Asy ou’
           veprobabl
                   yguessed,PC-connect
                                     edVRheadset sarequi
                                                       teexpensiveand
     rel
       ativ
          elyfewpeopl
                    earewi l
                           li
                            ngtodropthatki
                                         ndofcashont hem.Yetthere’
                                                                 sanother
     wayt oexperi
                encevi
                     rt
                      ualreal
                            it
                             y–usi ngst
                                      andaloneheadsetst
                                                      hatdon’tneedtobe
     connectedtoacomputerorconsole.
     MoststandaloneVRheadsetsuseasmar tphonescr
                                              eent
                                                 oprovi
                                                      det
                                                        hevir
                                                            tualr
                                                                eal
                                                                  i
                                                                  ty
     exper
         ience.Suchdev
                     icesarequit
                               eaf f
                                   ordabl
                                        e,asuser
                                               scansi
                                                    mplyi
                                                        nser
                                                           tthei
                                                               r
     smart
         phonei ntot
                   heheadsettoenjoyVR
Augmentedreal
            it
             y(AR)isali
                      ve,di
                          rectori
                                ndi
                                  rectvi
                                       ewofaphysical,
                                                    real-
                                                        wor
                                                          ldenvi
                                                               ronment
whoseelementsareaugmented(orsuppl
                                emented)bycomput
                                               er-generat
                                                        edsensor
                                                               yinputsuch
assound,vi
         deo,gr
              aphicsorGPSdata.
Augment
      edreali
            tyistheover
                      layofdigi
                              talcontentonther
                                             eal
                                               -wor
                                                  ldenv
                                                      ironment
                                                             .Vi
                                                               rt
                                                                ual
                                                                  obj
                                                                    ect
                                                                      s
canbei
     nv ar
         iousforms:i
                   mages,videos,ori
                                  nteracti
                                         vedat
                                             a.
I
notherwords,
           ify
             ouseet herealwor
                            ldsuppl
                                  ementedwit
                                           hdigit
                                                alobj
                                                    ects,
                                                        that
                                                           ’sAR.Imagi
                                                                    ne
youwantt
       obuyapi eceoffur
                      nitur
                          e–achair,
                                  forexampl
                                          e.Augmentedreal
                                                        ityt
                                                           echnol
                                                                ogycan
hel
  pyoucheckhowdi f
                 fer
                   entchair
                          swil
                             llooki
                                  nyourroom andpi
                                                cktheonethatfi
                                                             tsbest
                                                                  .
Ther
   ear
     etwomai
           nway
              s:
1.Por
    tabl
       edev
          ices
ARi st
     hemostaccessi
                 blereal
                       it
                        ytechnol
                               ogy,
                                  aspeoplecanusethei
                                                   rsmart
                                                        phonesortabl
                                                                   etst
                                                                      o
runaugment
         edreali
               tyappli
                     cat
                       ions.ARappsuseaphonecameratocaptur
                                                        ethereal
                                                               wor l
                                                                   d;
vir
  tual
     obj
       ect
         sarethenov er
                     lai
                       danduserscanseethem ont
                                             heirsmart
                                                     phonescr
                                                            een.
2.Smar
     tgl
       assesandARheadset
                       s
                                   17
Anotherwaytocr eateARexperi
                          encesistousespeci
                                          alsmartgl
                                                  assesorheadsets.Unl
                                                                    ikeVR
headsets,t
         heseARgl assesandheadsetsdon’
                                     timmerseusersi
                                                  ntoaf ul
                                                         l
                                                         yv i
                                                            rt
                                                             ualenvi
                                                                   ronment
butjustadddigi
             talobject
                     stothereal
                              wor l
                                  d.Wit
                                      hGoogleGlass,
                                                  forexample,di
                                                              git
                                                                aldatais
proj
   ectedri
         ghtinf r
                ontoftheuser
                           ’seyes.
Mixedreal
        it
         y(MR)—sometimesrefer
                            redtoashy
                                    bri
                                      dreal
                                          i
                                          ty—i
                                             sthemergi
                                                     ngofrealandv i
                                                                  rt
                                                                   ual
worldstopr
         oducenewenv i
                     ronmentsandvi
                                 sual
                                    i
                                    sati
                                       onswher
                                             ephysi
                                                  calanddi
                                                         git
                                                           alobjectsco-
exi
  standinter
           acti
              nreal
                  time.
Inmixedr
       eali
          ty(
            someti
                 mescal
                      ledhybr
                            idr
                              eal
                                it
                                 y),
                                   virt
                                      ualcont
                                            entisnotonlyov
                                                         erl
                                                           aidont
                                                                her
                                                                  eal
envi
   ronment(
          asinAR)buti
                    sanchor
                          edtoandi
                                 nteract
                                       swiththatenvi
                                                   ronment
                                                         .
Putsimply,i
          nmixedreali
                    tyyoucanseevir
                                 tualobjectsj
                                            ustli
                                                keyoucaninaugment
                                                                edr
                                                                  eal
                                                                    i
                                                                    ty,but
theseobject
          scanalsointer
                      actwit
                           htherealworld.Inasense,mixedr
                                                       eal
                                                         it
                                                          yisamorei
                                                                  mmersive
andinter
       acti
          vetypeofaugmentedreal
                              it
                               y.
Di
 ff
  erentt
       ypesofdev
               icesar
                    erequi
                         redt
                            oexper
                                 iencet
                                      heset
                                          wof
                                            ormsofmi
                                                   xedr
                                                      eal
                                                        i
                                                        ty:
1.Hol
    ogr
      aphi
         cdev
            ices
Theseheadset
           shavetranslucentglassest
                                  hatal
                                      l
                                      owy out
                                            operfect
                                                   lyseey
                                                        oursurr
                                                              oundings.
Vir
  tual
     experi
          encesar
                ecr eatedwiththehel
                                  pofhologr
                                          ams.That’
                                                  showMicrosof
                                                             tHoloLens
works.
2.I
  mmer
     siv
       edev
          ices
                                    18
Theseheadsetshav
               enon-t
                    ransl
                        ucentdisplay
                                   st hatcomplet
                                               elybl
                                                   ockouttherealwor
                                                                  ld(j
                                                                     ustl
                                                                        ike
VRheadsets)andusecamerasfort
                           racking.Windowsmi xedreal
                                                   i
                                                   tyheadset
                                                           sf r
                                                              om AcerandHP
workthi
      sway .
                                    19
XRsdk’
     s
1.Googl
      eVR
Googl
    eVRisthet
            echnologybehi
                        ndbothGoogl eDay dr
                                          eam andGoogleCar
                                                         dboar
                                                             dVRpl atf
                                                                     orms.
Googl
    eVRencompassessupportforsmart
                                phones, headmountedvi
                                                    ewersandcont
                                                               rol
                                                                 lers,
st
 andal
     oneheadmounteddispl
                       aysandapplicat
                                    ions.GoogleVRprovi
                                                     desanSDKforUnitythat
al
 lowsyout
        obuil
            dVRcont entf
                       orthi
                           srichecosystem ofdevi
                                               ces.
Googl eVRtechnol
               ogiesi ncludesDaydream,aplat
                                          for
                                            mf orhighquali
                                                         tymobileVRand
Cardboard,bui
            ltf
              orbite-sizeVRexperiencesand360v i
                                              deo.Daydream consi
                                                               stsofDay
                                                                      dream-
readyphones,headsets,cont rol
                            l
                            ersandexperi
                                       encesandsupportshigh-endAndroi
                                                                    dmobil
                                                                         e
devicesthr
         oughDay dream.
                                     20
GoogleCardboardisthemostaccessibl
                                emobileVRsol ut
                                              ion,al
                                                   lowi
                                                      nganyonewi t
                                                                 hani OSor
Androidsmart
           phonet oexperi
                        enceVRapps.Car dboar
                                           ddoeshav  emi
                                                       nimum andr ecommended
requi
    rementsforit
               susage,butthesearemuchlesshardwar e-
                                                  boundthanDaydream, f
                                                                     ocusi
                                                                         ng
mainlyontheoperati
                 ngsystem andbasiccont
                                     rolsyst
                                           ems( suchasthegyroscope).
Daydream al
          l
          owsmor efeature-
                         ri
                          chexperi
                                 encesthanCardboard,
                                                   butonlysuppor
                                                               tsDaydr
                                                                     eam
readydevi
        cessuchasDay dream-r
                           eadyphones,buil
                                         tforVRwithhigh-
                                                       resol
                                                           uti
                                                             ondi
                                                                spl
                                                                  ays,
smoot hgr
        aphicsandhi
                  ghf i
                      deli
                         tysensor
                                sforpreci
                                        seheadt r
                                                acki
                                                   ng.
2.Vuf
    ori
      a
Vufori
     aisacr oss-platf
                    orm AugmentedReal i
                                      ty(AR)andMi xedReali
                                                         ty(MR)appli
                                                                   cati
                                                                      on
devel
    opmentpl atform, wit
                       hrobusttr
                               ackingandper f
                                            ormanceonav  ari
                                                           etyofhar
                                                                  dware(incl
                                                                           udi
                                                                             ng
mobiledev i
          cesandmi  xedreal
                          it
                           yHeadMount  edDisplay
                                               s( HMD)suchast heMicrosoft
HoloLens).Unit
             y’sintegrat
                       ionofVufori
                                 aallowsy outocreatevi
                                                     sionappsandgamesf or
Androidandi OSusi ngadr ag-
                          and-dr
                               opaut hori
                                        ngwor kf
                                               low.
3.Wi
   ndowsMi
         xedReal
               i
               ty
WindowsMi xedReal
                it
                 y(WMR)isaMi cr
                              osoftpl
                                    atf
                                      orm buil
                                             taroundtheWindows10API,
al
 l
 owi ngappli
           cat
             ionst
                 orenderdi
                         git
                           alcont
                                entonholographi
                                              candi mmersi
                                                         vedispl
                                                               aydev
                                                                   ices.
Hol
  ographicdev
            icessuchast
                      heMi cr
                            osoftHoloLensal
                                          l
                                          owy out
                                                oseethephysi
                                                           calenv
                                                                ironment
ar
 oundy ouwhil
            ewearingt
                    heheadset
                            ,blendi
                                  ngt her
                                        ealwor
                                             ldwi
                                                thvi
                                                   rt
                                                    ualcont
                                                          ent.
WindowsMixedReal
               it
                yimmersi
                       veheadset
                               sf eat
                                    ureanopaquedi
                                                spl
                                                  ayt
                                                    obl
                                                      ockoutt
                                                            hephy
                                                                sical
worl
   dandsurroundy
               ouina360degreevir
                               tualenvi
                                      ronment
                                            .
                                      21
22