Fix error in the Android editor

pull/39/head
Fredia Huya-Kouadio 2025-08-06 06:56:43 +07:00
parent 3fa3ee7e07
commit 1c1cb69230
1 changed files with 2 additions and 1 deletions

@ -970,7 +970,8 @@ func _init() -> void:
node_3d_editor_toolbar_margin_container.add_theme_constant_override('margin_top', int(base_margin * 0.5 * scale))
node_3d_editor_toolbar_margin_container.add_theme_constant_override('margin_bottom', int(base_margin * 0.5 * scale))
if Engine.get_version_info().hex >= 0x040400:
# GameView is not enabled in the Android editor as the Game workspace is implemented differently
if Engine.get_version_info().hex >= 0x040400 and not OS.has_feature('android'):
var game_view : Control = EditorInterface.get_base_control().find_children('', 'GameView', true, false)[0]
var game_view_toolbar_margin_container : Control = game_view.find_children('', 'MarginContainer', true, false)[0]
game_view_toolbar_margin_container.add_theme_constant_override('margin_top', int(base_margin * 0.5 * scale))