-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
All Unity paths are with Unix separator / while Path.Combine() under Windows uses \
So comparing if (str.Equals(Paths.configPath)) won't work.
This breaks the main Setup window.
Fixed with:
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets,
string[] movedFromAssetPaths)
{
// handle windows paths.
var configPath = Path.DirectorySeparatorChar == '/'
? Paths.configPath
: Paths.configPath.Replace(Path.DirectorySeparatorChar, '/');
foreach (string str in importedAssets)
{
// We are interested in knowing when the SetupConfig has been re-imported so that it can correctly be
// loaded and used by the Init function.
if (str.Equals(configPath))
{
Init();
break;
}
}
}
Metadata
Metadata
Assignees
Labels
No labels