Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:interface:preview [2020/06/28 15:26]
4ian
gdevelop5:interface:preview [2020/12/26 13:56] (current)
Line 4: Line 4:
  
 {{ :gdevelop5:interface:preview:pasted:20200628-132309.png?nolink }} {{ :gdevelop5:interface:preview:pasted:20200628-132309.png?nolink }}
-_From left to right: the Project Manager button, the Export button, the Preview button and the Debug button._+_From left to right: the Project Manager button, the Export button, the Play button and the Debug button._
  
 You can also access more options by right clicking the "Play" button. The "Debug" button on the right allows you to open a Network Preview. You can also access more options by right clicking the "Play" button. The "Debug" button on the right allows you to open a Network Preview.
 +
 +After you click the "Play" button to launch a preview, the game is opened and run in a separate window:
 +
 +{{:gdevelop5:interface:preview:pasted:20200628-152852.png}}
  
 ## Launch a preview of a scene ## Launch a preview of a scene
Line 15: Line 19:
  
 The preview will open in a separate window. Close the preview window to end it. The preview will open in a separate window. Close the preview window to end it.
 +
 +### Apply your changes to your live preview
 +
 +When the preview of your game is running, you can click again the Play button to apply any changes that you made in the editor to your preview. This is very useful for example to design the level of your game while playing to it, allowing you to quickly see and test the result without having to restart from the beginning of the level after each change.
 +
 +When a preview is running in a window, the "Play" button icon will change to indicate that you can apply your changes to this preview (this is called "Live Preview" or, using more technical terms, "Hot Reloading"):
 +
 +{{ :gdevelop5:interface:preview:pasted:20200628-154642.png?nolink }}
 +
 +After clicking on it, GDevelop will internally re-generate the game and will then update the preview. Any modification on objects, in the scene, in events, layers, variables or extensions will be reflected in the preview:
 +
 +{{ :gdevelop5:interface:editing_a_level_with_live_preview.gif?nolink |}}
 +
 +<note tip>This is especially useful when you want to do some tweaks to your game, like changing the parameters of effects or the properties of the behavior of an object, and see the result directly. It's also useful to check how your events are working without restarting your preview from the beginning.</note>
 +
 +Some editors also include a button allowing you to start a preview or apply changes that you made directly from the editor:
 +
 +{{ :gdevelop5:interface:preview:pasted:20200628-162346.png?nolink }}
 +
 +When clicked, changes that you've made in the current editor will be applied to your preview(s).
 +
 +Note that in certain rare cases, GDevelop will be unable to apply your changes to the preview. In this case, a dialog will invite you to close the preview and launch a new one from scratch. If you also need to restart from the beginning, because for example you destroyed an enemy and want to try it again, just close the window and click the "Play" button again.
 +
 +### Start multiple live previews
 +
 +While a preview is running, you can right click the "Play" button to show a menu where you can launch another preview in a new window:
 +
 +{{ :gdevelop5:interface:preview:pasted:20200628-161539.png?nolink }}
 +
 +You can click the Play button to apply changes made in the editor, and all the running previews will be updated.
  
 ### Overriding the scene used to start the preview ### Overriding the scene used to start the preview
Line 41: Line 75:
 {{ :gdevelop5:interface/preview-wifi-running.png?nolink |}} {{ :gdevelop5:interface/preview-wifi-running.png?nolink |}}
  
-<note tip>You can close the pop-up window in the editor and continue to edit your game. If you launch a new preview, the mobile devices and any connected computer will automatically refresh the game to show the changes made!</note>+You can now close the pop-up window in the editor and continue to edit your game. When you click on the button to apply the changes to the preview, all the previews running on your computer, other computers or tablet/phones will be updated. 
 + 
 +You can also hit the "Reload" button of your device browser to restart the preview from scratch. 
  
 ## Launch a preview with the Debugger and the Profiler ## Launch a preview with the Debugger and the Profiler