mirror of
https://github.com/CrispyPin/ovr-utils.git
synced 2024-11-22 15:40:25 +01:00
create export plugin to make window default size 16x16, while still allowing for easy overlay editing
This commit is contained in:
parent
3993531f2d
commit
6b18c51391
4 changed files with 34 additions and 1 deletions
14
ovr-utils/addons/ovr_utils/ovr_utils.gd
Normal file
14
ovr-utils/addons/ovr_utils/ovr_utils.gd
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
var export_plugin
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_tree():
|
||||||
|
export_plugin = preload("res://addons/ovr_utils/ovr_utils_exporter.gd").new()
|
||||||
|
add_export_plugin(export_plugin)
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_tree():
|
||||||
|
if export_plugin:
|
||||||
|
remove_export_plugin(export_plugin)
|
12
ovr-utils/addons/ovr_utils/ovr_utils_exporter.gd
Normal file
12
ovr-utils/addons/ovr_utils/ovr_utils_exporter.gd
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
tool
|
||||||
|
extends EditorExportPlugin
|
||||||
|
|
||||||
|
func _export_begin(features: PoolStringArray, is_debug: bool, path: String, flags: int) -> void:
|
||||||
|
ProjectSettings.set_setting("display/window/size/height", 16)
|
||||||
|
ProjectSettings.set_setting("display/window/size/width", 16)
|
||||||
|
ProjectSettings.save()
|
||||||
|
|
||||||
|
func _export_end() -> void:
|
||||||
|
ProjectSettings.set_setting("display/window/size/height", 2048)
|
||||||
|
ProjectSettings.set_setting("display/window/size/width", 2048)
|
||||||
|
ProjectSettings.save()
|
7
ovr-utils/addons/ovr_utils/plugin.cfg
Normal file
7
ovr-utils/addons/ovr_utils/plugin.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="OVR Utils"
|
||||||
|
description="OVR Utils exporter"
|
||||||
|
author="CrispyPin"
|
||||||
|
version=""
|
||||||
|
script="ovr_utils.gd"
|
|
@ -29,7 +29,7 @@ window/size/height=2048
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PoolStringArray( "res://addons/godot-openvr/plugin.cfg", "res://addons/openvr_overlay/plugin.cfg", "res://addons/settings-manager/plugin.cfg" )
|
enabled=PoolStringArray( "res://addons/godot-openvr/plugin.cfg", "res://addons/openvr_overlay/plugin.cfg", "res://addons/ovr_utils/plugin.cfg", "res://addons/settings-manager/plugin.cfg" )
|
||||||
|
|
||||||
[gdnative]
|
[gdnative]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue