Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 4471b59

Browse files
author
Paul Balaji
authored
Import DAT file using relative path (#948)
1 parent b75446f commit 4471b59

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- Fixed a bug where if an entity received an event and was removed from your worker's view in the same ops list, the event would not be removed.
3333
- Fixed a bug where clicking on `SpatialOS` > `Generate Dev Authentication Token` would not always refresh the asset database correctly.
3434
- Fixed a bug where requireables on a GameObject linked to the worker entity were not injected properly.
35+
- Fixed a bug where the `DevAuthToken.txt` asset would be imported from an invalid AssetDatabase path.
3536

3637
## `0.2.1` - 2019-04-15
3738

workers/unity/Packages/com.improbable.gdk.tools/DevAuthTokenUtils.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private static void Generate()
1717
{
1818
var devAuthToken = string.Empty;
1919
var gdkToolsConfiguration = GdkToolsConfiguration.GetOrCreateInstance();
20-
var devAuthTokenDir = gdkToolsConfiguration.DevAuthTokenFullDir;
20+
var devAuthTokenFullDir = gdkToolsConfiguration.DevAuthTokenFullDir;
2121
var devAuthTokenFilePath = gdkToolsConfiguration.DevAuthTokenFilepath;
2222
var devAuthTokenLifetimeHours = $"{gdkToolsConfiguration.DevAuthTokenLifetimeHours}h";
2323

@@ -45,9 +45,9 @@ private static void Generate()
4545
return;
4646
}
4747

48-
if (!Directory.Exists(devAuthTokenDir))
48+
if (!Directory.Exists(devAuthTokenFullDir))
4949
{
50-
Directory.CreateDirectory(devAuthTokenDir);
50+
Directory.CreateDirectory(devAuthTokenFullDir);
5151
}
5252

5353
try
@@ -61,7 +61,9 @@ private static void Generate()
6161
}
6262

6363
Debug.Log($"Saving token {devAuthToken} to {devAuthTokenFilePath}.");
64-
AssetDatabase.ImportAsset(devAuthTokenFilePath, ImportAssetOptions.ForceUpdate);
64+
AssetDatabase.ImportAsset(
65+
Path.Combine("Assets", gdkToolsConfiguration.DevAuthTokenDir, "DevAuthToken.txt"),
66+
ImportAssetOptions.ForceUpdate);
6567
AssetDatabase.Refresh();
6668
}
6769
}

0 commit comments

Comments
 (0)