Skip to content

Commit 9326664

Browse files
authored
Merge pull request #44 from monaverse/mona-library-fix
Mona Library and QA Fixes
2 parents 486d149 + f953cbb commit 9326664

22 files changed

+572
-303
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,14 @@
11
<!--- Provide a general summary of your changes in the Title above -->
22

3-
## Asana Ticket
4-
<!--- Link your asana ticket here, e.g. https://app.asana.com/0/1203295540401177/1203426513481981/f -->
3+
## Github Issues
4+
Closes
55

66
## Description
77
<!--- Describe your changes in detail -->
88

9-
## Motivation and Context
10-
<!--- Why is this change required? What problem does it solve? -->
119

1210
## How has this been tested?
1311
<!--- Please describe in detail how you tested your changes. -->
1412
<!--- Include details of your testing environment, tests ran to see how -->
1513
<!--- your change affects other areas of the code, etc. -->
1614
<!--- Include any special test/environment setup for others -->
17-
18-
## Screenshots (if appropriate):
19-
20-
## Types of changes
21-
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
22-
- [ ] Bug fix (non-breaking change which fixes an issue)
23-
- [ ] New feature (non-breaking change which adds functionality)
24-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
25-
26-
## Checklist:
27-
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
28-
<!--- If you're unsure about any of these, don't hesitate to ask in discord. We're here to help! -->
29-
- [ ] My code follows the code style of this project.
30-
- [ ] My change requires a change to the documentation.
31-
- [ ] I have updated the documentation accordingly.

Assets/Mona/BuildMintableFiles.cs

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,32 @@ static void BuildMintableFilesHandler()
1212
Helpers.UpsertExportsDirectory();
1313
BuildPlaygroundFiles.BuildPlaygroundFilesHandler();
1414

15-
List<string> sceneList = new List<string>()
15+
QualityAssurance.SpaceErrors = QualityAssurance.GetSpaceErrors();
16+
17+
if (QualityAssurance.SpaceErrors == null || QualityAssurance.SpaceErrors.Count == 0)
1618
{
17-
Constants.SpacePath,
18-
Constants.PortalsPath,
19-
Constants.ArtifactsPath
20-
};
19+
List<string> sceneList = new List<string>()
20+
{
21+
Constants.SpacePath,
22+
Constants.PortalsPath,
23+
Constants.ArtifactsPath
24+
};
2125

22-
List<string> exportsList = new List<string>();
26+
List<string> exportsList = new List<string>();
2327

24-
foreach (string scene in sceneList)
25-
{
26-
exportsList.Add(scene);
27-
string[] sceneDependencies = AssetDatabase.GetDependencies(scene, true);
28-
foreach (string dependency in sceneDependencies)
28+
foreach (string scene in sceneList)
2929
{
30-
exportsList.Add(dependency);
30+
exportsList.Add(scene);
31+
string[] sceneDependencies = AssetDatabase.GetDependencies(scene, true);
32+
foreach (string dependency in sceneDependencies)
33+
{
34+
exportsList.Add(dependency);
35+
}
3136
}
32-
}
3337

34-
AssetDatabase.ExportPackage(exportsList.ToArray(), Constants.MintingFile, ExportPackageOptions.Recurse);
35-
Helpers.OpenDirectory(Constants.ExportsDirectory);
38+
AssetDatabase.ExportPackage(exportsList.ToArray(), Constants.MintingFile, ExportPackageOptions.Recurse);
39+
Helpers.OpenDirectory(Constants.ExportsDirectory);
40+
}
3641
}
3742
}
3843
}

Assets/Mona/BuildPlaygroundFiles.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#if UNITY_EDITOR
22
using UnityEditor;
3+
using UnityEngine;
34

45
namespace Mona
56
{
@@ -8,9 +9,19 @@ public class BuildPlaygroundFiles
89
[MenuItem("Mona/Build Playground Files")]
910
public static void BuildPlaygroundFilesHandler()
1011
{
11-
Helpers.UpsertExportsDirectory();
12-
BuildPipeline.BuildAssetBundles(Constants.PlaygroundDirectory, BuildAssetBundleOptions.None, BuildTarget.WebGL);
13-
Helpers.OpenDirectory(Constants.ExportsDirectory);
12+
QualityAssurance.SpaceErrors = QualityAssurance.GetSpaceErrors();
13+
14+
if (QualityAssurance.SpaceErrors == null || QualityAssurance.SpaceErrors.Count == 0)
15+
{
16+
Helpers.UpsertExportsDirectory();
17+
BuildPipeline.BuildAssetBundles(Constants.PlaygroundDirectory, BuildAssetBundleOptions.None, BuildTarget.WebGL);
18+
Helpers.OpenDirectory(Constants.ExportsDirectory);
19+
Application.OpenURL(Constants.PlaygroundURL);
20+
}
21+
else
22+
{
23+
QualityAssuranceEditor.Init();
24+
}
1425
}
1526
}
1627
}

0 commit comments

Comments
 (0)