Skip to content

Commit

Permalink
Merge pull request #44 from monaverse/mona-library-fix
Browse files Browse the repository at this point in the history
Mona Library and QA Fixes
  • Loading branch information
TomMoore515 committed Jul 11, 2023
2 parents 486d149 + f953cbb commit 9326664
Show file tree
Hide file tree
Showing 22 changed files with 572 additions and 303 deletions.
21 changes: 2 additions & 19 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
<!--- Provide a general summary of your changes in the Title above -->

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

## Description
<!--- Describe your changes in detail -->

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

## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->
<!--- Include any special test/environment setup for others -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask in discord. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
35 changes: 20 additions & 15 deletions Assets/Mona/BuildMintableFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,32 @@ static void BuildMintableFilesHandler()
Helpers.UpsertExportsDirectory();
BuildPlaygroundFiles.BuildPlaygroundFilesHandler();

List<string> sceneList = new List<string>()
QualityAssurance.SpaceErrors = QualityAssurance.GetSpaceErrors();

if (QualityAssurance.SpaceErrors == null || QualityAssurance.SpaceErrors.Count == 0)
{
Constants.SpacePath,
Constants.PortalsPath,
Constants.ArtifactsPath
};
List<string> sceneList = new List<string>()
{
Constants.SpacePath,
Constants.PortalsPath,
Constants.ArtifactsPath
};

List<string> exportsList = new List<string>();
List<string> exportsList = new List<string>();

foreach (string scene in sceneList)
{
exportsList.Add(scene);
string[] sceneDependencies = AssetDatabase.GetDependencies(scene, true);
foreach (string dependency in sceneDependencies)
foreach (string scene in sceneList)
{
exportsList.Add(dependency);
exportsList.Add(scene);
string[] sceneDependencies = AssetDatabase.GetDependencies(scene, true);
foreach (string dependency in sceneDependencies)
{
exportsList.Add(dependency);
}
}
}

AssetDatabase.ExportPackage(exportsList.ToArray(), Constants.MintingFile, ExportPackageOptions.Recurse);
Helpers.OpenDirectory(Constants.ExportsDirectory);
AssetDatabase.ExportPackage(exportsList.ToArray(), Constants.MintingFile, ExportPackageOptions.Recurse);
Helpers.OpenDirectory(Constants.ExportsDirectory);
}
}
}
}
Expand Down
17 changes: 14 additions & 3 deletions Assets/Mona/BuildPlaygroundFiles.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;

namespace Mona
{
Expand All @@ -8,9 +9,19 @@ public class BuildPlaygroundFiles
[MenuItem("Mona/Build Playground Files")]
public static void BuildPlaygroundFilesHandler()
{
Helpers.UpsertExportsDirectory();
BuildPipeline.BuildAssetBundles(Constants.PlaygroundDirectory, BuildAssetBundleOptions.None, BuildTarget.WebGL);
Helpers.OpenDirectory(Constants.ExportsDirectory);
QualityAssurance.SpaceErrors = QualityAssurance.GetSpaceErrors();

if (QualityAssurance.SpaceErrors == null || QualityAssurance.SpaceErrors.Count == 0)
{
Helpers.UpsertExportsDirectory();
BuildPipeline.BuildAssetBundles(Constants.PlaygroundDirectory, BuildAssetBundleOptions.None, BuildTarget.WebGL);
Helpers.OpenDirectory(Constants.ExportsDirectory);
Application.OpenURL(Constants.PlaygroundURL);
}
else
{
QualityAssuranceEditor.Init();
}
}
}
}
Expand Down
Loading

0 comments on commit 9326664

Please sign in to comment.