Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← (Unity 4) Publishing the game - 07 - Roll-a-ball - Unity Official Tutorials

Get Embed Code
2 Languages

Showing Revision 1 created 09/08/2016 by Amara Bot.

  1. Now that we've finished our game we need to
  2. present it to our players.
  3. One of the greatest things about Unity is that
  4. once we have created our game we can deploy
  5. it to many of the current platforms.
  6. For more detailed information on building and
  7. build targets please see the lesson linked below.
  8. Before we build our game we should
  9. save our scene.
  10. To build our game we must first open
  11. the Build Settings window.
  12. We can do this by selecting File - Build Settings
  13. or by using the key combination of
  14. shift plus command or control plus B.
  15. This brings up the Build Settings window.
  16. Our current build target is indicated by the Unity logo.
  17. The blue highlight indicates our focus and
  18. shows us on the right hand side the build
  19. options for the currently selected platform.
  20. We want to build to the web player.
  21. Our current build target is PC, Mac and
  22. Linux Standalone.
  23. To change build targets, select the desired platform
  24. from the list and click the Switch Platform button
  25. at the bottom of the window.
  26. Once we have selected our new build target
  27. we need to add the scenes we want to build
  28. to the Build Settings window.
  29. We can add the current scene by clicking the
  30. Add Current button.
  31. Or we can drag and drop any scene from our
  32. project view in to the field at the top of
  33. the Build Settings window.
  34. It's worth noting that we don't need to
  35. include every scene in our project.
  36. We only need to include the scenes we
  37. we want in our game.
  38. It is also possible to perform a build
  39. with no scenes in the build Settings window.
  40. If we do this, Unity will simply build our game
  41. using the current scene we have open for editing.
  42. Now we are ready to build our game.
  43. Let's return to the Build Settings window
  44. and click the Build button.
  45. This will bring up a dialogue box asking us
  46. to choose a build location.
  47. I like to associate my build location with
  48. my project, so I will create a new folder
  49. inside my project called Builds.
  50. This folder must be placed only on the
  51. root of our project alongside the
  52. assets and library folders.
  53. With the build folder selected let's name the build
  54. and then click save.
  55. Unity will now build the web player and
  56. save it to our Builds folder
  57. When building a web player Unity creates a
  58. folder with the name of our game
  59. and in that folder are 2 files.
  60. 1 is the Unity3D data file,
  61. which contains the game data,
  62. and an HTML file which holds the code
  63. to make a webpage with our game embedded in it.
  64. We must have both the data file and the HTML file
  65. to run our game in a browser.
  66. However we can write a custom HTML file
  67. to replace the page build by Unity.
  68. It is also possible to create a custom
  69. web player template which Unity can use to build
  70. that custom page automatically.
  71. To run the game open the HTML file.
  72. And now we are running a local copy of the
  73. game in our browser.
  74. To present this to our audience we need
  75. to place both the HTML file and the
  76. data file up on the internet.
  77. I'm going to open an FTP client and
  78. place the folder with both the HTML file and
  79. the data file in it up on my website.
  80. When the folder has been uploaded we can simply
  81. enter the address in to our browser
  82. and play our game.
  83. And, we win!
  84. So in these assignments we have learned how to
  85. create new game objects,
  86. how to position them in the scene,
  87. add new components to them,
  88. write our own custom behaviours for them
  89. using simple scripting.
  90. We've seen how to use lights, cameras,
  91. colliders, triggers, rigid bodies.
  92. We can collect and count objects.
  93. Though this is a very simple example
  94. it covers a large set of basic
  95. subjects important to understanding how to use Unity.
  96. For continued learning about Unity
  97. check the Learn site for more lessons,
  98. assignments and projects.