Skip to content

Commit 5976a8f

Browse files
authored
Merge pull request #11 from LinqToException/bugs/initial-setup
Initial setup ease, bug fixes and migrations
2 parents f4e3223 + 5d1add2 commit 5976a8f

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/[Bb]uilds/
66
/Assets/AssetStoreTools*
77
/Assets/Resources/AssetPack/
8+
/Assets/Resources/AssetPack.meta
89

910
# Visual Studio 2015 cache directory
1011
/.vs/
@@ -36,4 +37,3 @@ sysinfo.txt
3637

3738
*.assetProject*
3839
*.autosave*
39-

Assets/Editor/AssetPackSerializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private static string CreatePrefab(GameObject gameObject, string Guid)
8282

8383
var path = string.Format("Assets/Resources/AssetPack/{0}.prefab", Guid);
8484

85-
PrefabUtility.CreatePrefab(path, gameObject);
85+
PrefabUtility.SaveAsPrefabAsset(gameObject, path);
8686

8787
return path;
8888
}

Assets/Editor/UI/AssetEditorWindow.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,10 @@ private void DrawAssetPackSettingsSection()
275275

276276
if (GUILayout.Button("Export Asset Pack"))
277277
{
278-
ProjectManager.Export(ProjectManager.AssetPack.ArchiveAssets);
278+
if (ProjectManager.Export(ProjectManager.AssetPack.ArchiveAssets))
279+
{
280+
GUIUtility.ExitGUI();
281+
}
279282
}
280283
}
281284

Assets/Editor/UI/AutoSave.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
namespace ParkitectAssetEditor.Assets.Editor.UI
44
{
5-
public class AssetProcessor : SaveAssetsProcessor
5+
public class AssetProcessor : UnityEditor.AssetModificationProcessor
66
{
77
private static string[] OnWillSaveAssets(string[] paths)
88
{
9-
ProjectManager.Save();
9+
if (ProjectManager.Project != null)
10+
ProjectManager.Save();
1011

1112
return paths;
1213
}

Assets/Resources/AssetPack.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)