diff --git a/example.csharp/addons/tiltfive/T5ProjectSettings.cs b/example.csharp/addons/tiltfive/T5ProjectSettings.cs index b3b5a6b..12c5a10 100644 --- a/example.csharp/addons/tiltfive/T5ProjectSettings.cs +++ b/example.csharp/addons/tiltfive/T5ProjectSettings.cs @@ -27,9 +27,7 @@ static void DefineProjectSetting(String name, Variant.Type setting_type, Propert public static void setup_properties() { if (!isInitialized) { - DefineProjectSetting("xr/tilt_five/application_id", Variant.Type.String, PropertyHint.None, "", "my.game.com"); - DefineProjectSetting("xr/tilt_five/application_version", Variant.Type.String, PropertyHint.None, "", "0.1.0"); - DefineProjectSetting("xr/tilt_five/default_display_name", Variant.Type.String, PropertyHint.None, "", "Game: Player One"); + DefineProjectSetting("xr/tilt_five/default_display_name", Variant.Type.String, PropertyHint.None, "", ""); DefineProjectSetting("xr/tilt_five/trigger_click_threshhold", Variant.Type.Float, PropertyHint.Range, "0,1,0.01", 0.3); DefineProjectSetting("xr/tilt_five/debug_logging", Variant.Type.Bool, PropertyHint.None, "", false); @@ -39,17 +37,33 @@ public static void setup_properties() { public static String ApplicationID { - get { setup_properties(); return ProjectSettings.GetSettingWithOverride("xr/tilt_five/application_id").AsString(); } + get { + var app_id = ProjectSettings.GetSettingWithOverride("application/config/name").AsString(); + if (app_id == null || app_id == "") + return "tiltfive.godot.game"; + return app_id; + } } public static String ApplicationVersion { - get { setup_properties(); return ProjectSettings.GetSettingWithOverride("xr/tilt_five/application_version").AsString(); } + get { + var version = ProjectSettings.GetSettingWithOverride("application/config/version").AsString(); + if (version == null || version == "") + return "unknown"; + return version; + } } public static String DefaultDisplayName { - get { setup_properties(); return ProjectSettings.GetSettingWithOverride("xr/tilt_five/default_display_name").AsString(); } + get { + setup_properties(); + var disp_name = ProjectSettings.GetSettingWithOverride("xr/tilt_five/default_display_name").AsString(); + if (disp_name == null || disp_name == "") + return ApplicationID; + return disp_name; + } } public static float TriggerClickThreshhold diff --git a/example.gd/addons/tiltfive/T5ProjectSettings.gd b/example.gd/addons/tiltfive/T5ProjectSettings.gd index b06ffbe..48140e8 100644 --- a/example.gd/addons/tiltfive/T5ProjectSettings.gd +++ b/example.gd/addons/tiltfive/T5ProjectSettings.gd @@ -27,27 +27,32 @@ static func _define_project_setting( static func setup_properties(): if not _initialized: - _define_project_setting("xr/tilt_five/application_id", TYPE_STRING, PROPERTY_HINT_NONE, "", "my.game.com") - _define_project_setting("xr/tilt_five/application_version", TYPE_STRING, PROPERTY_HINT_NONE, "", "0.1.0") - _define_project_setting("xr/tilt_five/default_display_name", TYPE_STRING, PROPERTY_HINT_NONE, "", "Game: Player One") + _define_project_setting("xr/tilt_five/default_display_name", TYPE_STRING) _define_project_setting("xr/tilt_five/trigger_click_threshhold", TYPE_FLOAT, PROPERTY_HINT_RANGE, "0,1,0.01", 0.3) _define_project_setting("xr/tilt_five/debug_logging", TYPE_BOOL, PROPERTY_HINT_NONE, "", false) _initialized = true static var application_id : String: get: - setup_properties() - return ProjectSettings.get_setting_with_override("xr/tilt_five/application_id") + var app_id := ProjectSettings.get_setting_with_override("application/config/name") + if not app_id or app_id == "": + return "tiltfive.godot.game" + return app_id static var application_version : String: get: - setup_properties() - return ProjectSettings.get_setting_with_override("xr/tilt_five/application_version") - + var version := ProjectSettings.get_setting_with_override("application/config/version") + if not version or version == "": + return "unknown" + return version + static var default_display_name : String: get: setup_properties() - return ProjectSettings.get_setting_with_override("xr/tilt_five/default_display_name") + var disp_name := ProjectSettings.get_setting_with_override("xr/tilt_five/default_display_name") + if not disp_name or disp_name == "": + return T5ProjectSettings.application_id + return disp_name static var trigger_click_threshhold : float: get: