Repository: ynput/OpenPype
Issue: Unreal: Patch number in UE version breaks integration

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior:

When Unreal Engine has patch version inside - like 5.1.1, it will  break logic trying to get compatible integration here:

https://github.com/ynput/OpenPype/blob/5fbae39a745b0016b2ada9d054b696aef2007fee/openpype/hosts/unreal/lib.py#L323-L361

### Expected Behavior:

This logic should work with unreal editor with patch version.

### Version

3.15.9-nightly.1

### What platform you are running OpenPype on?

Windows

### Steps To Reproduce:

1. Install and configure Unreal Editor 5.1.1
2. Try to launch it on task without project

### Are there any labels you wish to add?

- [X] I have added the relevant labels to the bug report.

### Relevant log output:

```
Traceback (most recent call last):
  File "Z:\\tools\\windows\\AYON\\openpype\\tools\\launcher\\window.py", line 411, in run_action
    action().process(filtered_session)
  File "Z:\\tools\\windows\\AYON\\openpype\\tools\\launcher\\actions.py", line 112, in process
    self.application.launch(
  File "Z:\\tools\\windows\\AYON\\openpype\\lib\\applications.py", line 363, in launch
    return self.manager.launch(self.full_name, *args, **kwargs)
  File "Z:\\tools\\windows\\AYON\\openpype\\lib\\applications.py", line 516, in launch
    return context.launch()
  File "Z:\\tools\\windows\\AYON\\openpype\\lib\\applications.py", line 1237, in launch
    prelaunch_hook.execute()
  File "Z:\\tools\\windows\\AYON\\openpype\\hooks\\pre_global_host_data.py", line 42, in execute
    prepare_app_environments(temp_data, self.launch_context.env_group)
  File "Z:\\tools\\windows\\AYON\\openpype\\lib\\applications.py", line 1576, in prepare_app_environments
    final_env = add_implementation_envs(loaded_env, app)
  File "Z:\\tools\\windows\\AYON\\openpype\\hosts\\unreal\\addon.py", line 27, in add_implementation_envs
    compatible_versions = get_compatible_integration(
  File "Z:\\tools\\windows\\AYON\\openpype\\hosts\\unreal\\lib.py", line 339, in get_compatible_integration
    major, minor = ue_version.split(".")
ValueError: too many values to unpack (expected 2)
```

### Additional context:

_No response_


[cuID:[OP-6086](https://app.clickup.com/t/861mvmugn)]

Changed files:
openpype/hosts/unreal/addon.py

diff --git a/openpype/hosts/unreal/addon.py b/openpype/hosts/unreal/addon.py
index 1119b5c16c..ed23950b35 100644
--- a/openpype/hosts/unreal/addon.py
+++ b/openpype/hosts/unreal/addon.py
@@ -1,5 +1,7 @@
 import os
+import re
 from openpype.modules import IHostAddon, OpenPypeModule
+from openpype.widgets.message_window import Window
 
 UNREAL_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
 
@@ -19,6 +21,20 @@ class UnrealAddon(OpenPypeModule, IHostAddon):
 
         from .lib import get_compatible_integration
 
+        pattern = re.compile(r'^\\d+-\\d+$')
+
+        if not pattern.match(app.name):
+            msg = (
+                "Unreal application key in the settings must be in format"
+                "'5-0' or '5-1'"
+            )
+            Window(
+                parent=None,
+                title="Unreal application name format",
+                message=msg,
+                level="critical")
+            raise ValueError(msg)
+
         ue_version = app.name.replace("-", ".")
         unreal_plugin_path = os.path.join(
             UNREAL_ROOT_DIR, "integration", "UE_{}".format(ue_version), "Ayon"