defold change window resolution runtime
- User
defold change window resolution runtime
- Assistant
To change the window resolution at runtime in Defold, you typically use the
window.set_sizefunction. This function allows you to programmatically adjust the size of your application window while the game is running. Here's a basic example of how you can implement this:lua-- Include the window module local window = require "window" function init(self) -- Set a new size for the window. Replace 800 and 600 with your desired width and height. window.set_size(800, 600) end -- Rest of your game's logic