Overview
Godot’s export system allows you to package and deploy your game to multiple platforms. The export process uses export templates and presets to create platform-specific builds.
Export templates
Export templates are pre-compiled Godot binaries for each target platform. You need the correct templates for your Godot version.
Installing export templates
Editor
Manual installation
Open Editor > Manage Export Templates
Click Download and Install
Templates are downloaded and installed automatically
Download templates from https://godotengine.org/download
Extract to the templates directory:
Windows: %APPDATA%/Godot/export_templates/
macOS: ~/Library/Application Support/Godot/export_templates/
Linux: ~/.local/share/godot/export_templates/
Export template version must match your Godot editor version exactly.
Export presets
Export presets define how your project is exported for each platform.
Creating an export preset
Open export dialog
Go to Project > Export
Add preset
Click Add… and select your target platform
Configure preset
Set export options like name, executable path, and platform-specific settings
Export project
Click Export Project or Export PCK/Zip
Preset configuration
# Access export presets via code
var preset = EditorExportPlatform . create_preset ()
if preset :
preset . set_name ( "My Game - Windows" )
preset . set_export_path ( "builds/windows/game.exe" )
Export modes
Export project
Creates a complete, standalone build:
var platform = EditorExportPlatform . new ()
var preset = platform . create_preset ()
var result = platform . export_project ( preset , false , "builds/game.exe" , 0 )
if result == OK :
print ( "Export successful" )
Export PCK/Zip
Exports only the game data:
# PCK file contains all game resources
var result = platform . export_pack ( preset , false , "game.pck" , 0 )
PCK files are useful for updates and DLC. The game executable can load external PCK files at runtime.
Export debug vs release
Debug build
Release build
Includes debug symbols
Enables console output
Allows remote debugging
Larger file size
Slower performance
Optimized code
No debug symbols
Smaller file size
Better performance
Limited error information
Export options
Resources
# Configure which resources to export
Preset . set_export_filter ( EditorExportPreset . EXPORT_SELECTED_RESOURCES )
Preset . set_include_filter ( "*.tscn,*.tres" )
Preset . set_exclude_filter ( "*.blend,*.psd" )
# Feature tags for conditional resource loading
if OS . has_feature ( "mobile" ):
# Load mobile-optimized assets
pass
if OS . has_feature ( "editor" ):
# Editor-only code
pass
Encryption
Protect your game assets:
Enable Encrypt Exported PCK in export preset
Generate or provide an encryption key (256-bit)
Set encryption filters to include/exclude files
# Set encryption key in export preset
var key = "your_256_bit_encryption_key_here"
preset . set_encryption_key ( key )
preset . set_encryption_include_filters ( PackedStringArray ([ "*.gd" , "*.tscn" ]))
preset . set_encryption_exclude_filters ( PackedStringArray ([ "*.png" , "*.ogg" ]))
Store your encryption key securely. If lost, you won’t be able to update your game.
Resource packs
Load additional resources at runtime:
# Load external PCK file
var success = ProjectSettings . load_resource_pack ( "res://dlc/expansion.pck" )
if success :
# Resources from the pack are now available
var scene = load ( "res://dlc/new_level.tscn" )
# Load with offset (useful for embedded packs)
ProjectSettings . load_resource_pack ( "game.exe" , true , 12345 )
One-click deploy
Deploy directly to connected devices:
Setup
Enable Runnable checkbox in export preset
Connect your device (Android, iOS, etc.)
Click the one-click deploy button in the editor
# The editor uses this internally
var preset = get_export_preset ( "Android" )
if preset . is_runnable ():
platform . run ( preset , 0 , "" )
Custom export plugins
Extend the export process:
@tool
extends EditorExportPlugin
func _export_begin ( features , is_debug , path , flags ):
# Called when export starts
print ( "Exporting to: " , path )
func _export_file ( path , type , features ):
# Called for each exported file
if path . ends_with ( ".txt" ):
# Skip text files
skip ()
func _export_end ():
# Called when export completes
print ( "Export finished" )
# Register plugin
func _enter_tree ():
add_export_plugin ( self )
func _exit_tree ():
remove_export_plugin ( self )
Customizing exported files
Modify file content
func _export_file ( path , type , features ):
if path . ends_with ( ".json" ):
# Read original file
var file = FileAccess . open ( path , FileAccess . READ )
var content = file . get_as_text ()
file . close ()
# Modify content
var modified = content . replace ( "debug" , "release" )
# Add modified file to export
add_file ( path , modified . to_utf8_buffer (), false )
skip () # Don't include original
Add custom files
func _export_begin ( features , is_debug , path , flags ):
# Add README file
var readme = "Game instructions here"
add_file ( "README.txt" , readme . to_utf8_buffer (), false )
# Copy external file
var license = FileAccess . get_file_as_bytes ( "res://LICENSE" )
add_file ( "LICENSE.txt" , license , false )
Export validation
Validate export settings before building:
@tool
extends EditorExportPlugin
func _get_export_options ( platform ):
return [
{
"option" : { "name" : "custom_option" , "type" : TYPE_STRING },
"default_value" : "value"
}
]
func _get_export_option_warning ( platform , option ):
if option == "custom_option" :
var value = get_option ( option )
if value == "" :
return "Custom option cannot be empty"
return ""
Build automation
Automate exports from command line:
# Export using preset
godot --headless --export-release "Windows Desktop" "builds/game.exe"
# Export debug build
godot --headless --export-debug "Linux" "builds/game.x86_64"
# Export PCK only
godot --headless --export-pack "Windows Desktop" "builds/game.pck"
CI/CD integration
# GitHub Actions example
name : Export Game
on :
push :
tags :
- 'v*'
jobs :
export :
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@v3
- name : Export for Windows
uses : firebelley/godot-export@v5
with :
godot_version : 4.2
export_name : MyGame
export_preset : Windows
func export_all_platforms ():
var platforms = [
{ "name" : "Windows" , "path" : "builds/windows/game.exe" },
{ "name" : "Linux" , "path" : "builds/linux/game.x86_64" },
{ "name" : "macOS" , "path" : "builds/macos/game.zip" },
{ "name" : "Android" , "path" : "builds/android/game.apk" },
]
for platform in platforms :
print ( "Exporting " , platform . name )
# Export logic here
Common export settings
Name : Application name
Icon : Application icon
Version : Version number
Company : Company/developer name
Copyright : Copyright notice
Export mode : All resources, selected scenes, or selected resources
Filters : Include/exclude patterns
Script export mode : Text, compiled, or encrypted
Custom template : Use custom export template
Export path : Default export directory
Script encryption key : Encryption key for scripts
Troubleshooting exports
Missing export templates
# Check if templates are installed
var template_dir = EditorPaths . get_data_dir (). path_join ( "export_templates" )
if not DirAccess . dir_exists_absolute ( template_dir ):
print ( "Export templates not installed" )
Export errors
Template version mismatch Ensure export template version matches Godot version exactly.
Missing resources Check export filters and ensure all required resources are included.
Permission errors Run editor with appropriate permissions or choose different export path.
Platform-specific issues Check platform documentation for specific requirements.
Best practices
Test debug builds first Always test debug builds before creating release builds.
Use version control Tag releases in version control for reproducibility.
Automate exports Use CI/CD to automate multi-platform exports.
Verify builds Test exported builds on target platforms before distribution.
Next steps
Android Export for Android devices
iOS Export for iOS devices
Web Export for web browsers
Desktop Export for desktop platforms