learntoflutter / flutter_embed_unity

19 stars 5 forks source link

Fix exporter compilation error when Unity is not 2022.3. #23

Closed timbotimbo closed 4 months ago

timbotimbo commented 4 months ago

Description

A fix for a very minor issue.
The exporter script is supposed to show an error dialog on Unity versions that aren't 2022.3.

However the code within #if !UNITY_2022_3 doesn't even compile, it likely got left behind in a refactor because the 2022.3 compiler doesn't validate it.

This PR simply makes it compile again.

#if !UNITY_2022_3
-        ShowErrorMessage("This plugin only supports Unity 2022.3 LTS (Long Term Support).");
-        return ProjectExportCheckerResult.Failure();
+        ProjectExportHelpers.ShowErrorMessage("This plugin only supports Unity 2022.3 LTS (Long Term Support).");
+        return false;
#endif