if we can't show file browser, throw exception

This commit is contained in:
in0finite 2022-03-24 20:27:11 +01:00
parent 51f17a6229
commit 07a67f73e5

View file

@ -293,6 +293,11 @@ namespace SanAndreasUnity.Behaviours
if (string.IsNullOrEmpty (path)) {
// path is not set
// if we can't show file browser, throw exception
if (F.IsInHeadlessMode || F.IsAppInEditMode)
throw new System.InvalidOperationException("Game path is not set");
// show file browser to user to select path
m_showFileBrowser = true;
} else {