Skip to content

Commit

Permalink
Merge pull request #10 from UniToolsTeam/feature/web-gl
Browse files Browse the repository at this point in the history
Feature/web gl
  • Loading branch information
Rinal authored Mar 24, 2022
2 parents 563c9bc + 6d302dc commit e22dadb
Show file tree
Hide file tree
Showing 64 changed files with 252 additions and 78 deletions.
2 changes: 1 addition & 1 deletion Editor/Core/Pipelines/BuildPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(BuildPipeline),
menuName = nameof(UniTools) + "/Build/Pipeline"
menuName = MenuPaths.Pipelines + "Pipeline"
)]
public sealed class BuildPipeline : ScriptablePostBuildPipeline
{
Expand Down
2 changes: 1 addition & 1 deletion Editor/Core/Pipelines/CompositeBuildPipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(CompositeBuildPipeline),
menuName = nameof(UniTools) + "/Build/Composite Pipeline"
menuName = MenuPaths.Pipelines + "Composite Pipeline"
)]
public sealed class CompositeBuildPipeline : ScriptablePreBuildPipeline
{
Expand Down
5 changes: 2 additions & 3 deletions Editor/Defines/Models/ScriptingDefineSymbols.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(ScriptingDefineSymbols),
menuName = nameof(UniTools) + "/" + nameof(Build) + "/" + nameof(ScriptingDefineSymbols)
menuName = MenuPaths.Defines + "DefineSymbols"
)]
public sealed class ScriptingDefineSymbols : ScriptableObject
{
Expand All @@ -24,8 +24,7 @@ public override string ToString()
{
return string.Empty;
}



StringBuilder builder = new StringBuilder();

int last = m_defines.Count - 1;
Expand Down
3 changes: 1 addition & 2 deletions Editor/Defines/Pipelines/ScriptableBuildStepWithDefines.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Threading.Tasks;
using UniTools.Build;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;
Expand All @@ -8,7 +7,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(ScriptableBuildStepWithDefines),
menuName = nameof(UniTools) + "/Build/Steps/BuildWithDefines"
menuName = MenuPaths.Defines + "BuildWithDefines"
)]
public sealed class ScriptableBuildStepWithDefines : ScriptablePlatformBuildStep
{
Expand Down
3 changes: 1 addition & 2 deletions Editor/IO/Archive/CreateZipArchiveStep.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System;
using System.IO;
using System.Threading.Tasks;
using UniTools.Build;
using UnityEngine;

namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(CreateZipArchiveStep),
menuName = nameof(UniTools) + "/" + nameof(Build) + "/" + nameof(CreateZipArchiveStep)
menuName = MenuPaths.IO + "Zip Archive"
)]
public sealed class CreateZipArchiveStep : ScriptableCustomBuildStep
{
Expand Down
15 changes: 15 additions & 0 deletions Editor/IO/CustomEditors/EnsureDirectoryEmptyEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using UnityEditor;

namespace UniTools.Build
{
[CustomEditor(typeof(EnsureDirectoryEmpty))]
public sealed class EnsureDirectoryEmptyEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.LabelField(target.ToString());
serializedObject.ApplyModifiedProperties();
}
}
}
3 changes: 3 additions & 0 deletions Editor/IO/CustomEditors/EnsureDirectoryEmptyEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Editor/IO/CustomEditors/EnsureDirectoryExistsEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using UnityEditor;

namespace UniTools.Build
{
[CustomEditor(typeof(EnsureDirectoryExists))]
public sealed class EnsureDirectoryExistsEditor : Editor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.LabelField(target.ToString());
serializedObject.ApplyModifiedProperties();
}
}
}
3 changes: 3 additions & 0 deletions Editor/IO/CustomEditors/EnsureDirectoryExistsEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Editor/IO/Directory/EnsureDirectoryEmpty.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System;
using System.IO;
using System.Threading.Tasks;
using UniTools.Build;
using UnityEngine;

namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(EnsureDirectoryEmpty),
menuName = nameof(UniTools) + "/Build/IO/" + nameof(EnsureDirectoryEmpty)
menuName = MenuPaths.IO + nameof(EnsureDirectoryEmpty)
)]
public sealed class EnsureDirectoryEmpty : ScriptableCustomBuildStep
{
Expand All @@ -35,5 +34,10 @@ public override async Task Execute()

await Task.CompletedTask;
}

public override string ToString()
{
return m_path.ToString();
}
}
}
8 changes: 6 additions & 2 deletions Editor/IO/Directory/EnsureDirectoryExists.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System.IO;
using System.Threading.Tasks;
using UniTools.Build;
using UnityEngine;

namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(EnsureDirectoryExists),
menuName = nameof(UniTools) + "/Build/IO/" + nameof(EnsureDirectoryExists)
menuName = MenuPaths.IO + nameof(EnsureDirectoryExists)
)]
public sealed class EnsureDirectoryExists : ScriptableCustomBuildStep
{
Expand All @@ -19,5 +18,10 @@ public override async Task Execute()

await Task.CompletedTask;
}

public override string ToString()
{
return m_path.ToString();
}
}
}
2 changes: 1 addition & 1 deletion Editor/IO/Files/CopyFileToDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(CopyFileToDirectory),
menuName = nameof(UniTools) + "/Build/IO/" + nameof(CopyFileToDirectory)
menuName = MenuPaths.IO + nameof(CopyFileToDirectory)
)]
public sealed class CopyFileToDirectory : ScriptableCustomBuildStep
{
Expand Down
2 changes: 1 addition & 1 deletion Editor/IO/Files/DeleteFileOrDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(DeleteFileOrDirectory),
menuName = nameof(UniTools) + "/Build/Steps/Pre/" + nameof(DeleteFileOrDirectory)
menuName = MenuPaths.IO + nameof(DeleteFileOrDirectory)
)]
public sealed class DeleteFileOrDirectory : ScriptableCustomBuildStep
{
Expand Down
2 changes: 1 addition & 1 deletion Editor/IO/Path/CompositeScriptablePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(CompositeScriptablePath),
menuName = nameof(UniTools) + "/" + nameof(Build) + "/Composite Path"
menuName = MenuPaths.IO + "Composite Path"
)]
public sealed class CompositeScriptablePath : BaseScriptablePath
{
Expand Down
2 changes: 1 addition & 1 deletion Editor/IO/Path/ScriptablePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(ScriptablePath),
menuName = nameof(UniTools) + "/" + nameof(Build) + "/Path"
menuName = MenuPaths.IO + "Path"
)]
public sealed class ScriptablePath : BaseScriptablePath
{
Expand Down
3 changes: 1 addition & 2 deletions Editor/IO/Path/Steps/GenerateRandomPath.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System;
using System.IO;
using System.Threading.Tasks;
using UniTools.Build;
using UnityEngine;

namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(GenerateRandomPath),
menuName = nameof(UniTools) + "/Build/Steps/Pre/" + nameof(GenerateRandomPath)
menuName = MenuPaths.IO + nameof(GenerateRandomPath)
)]
public sealed class GenerateRandomPath : ScriptableCustomBuildStep
{
Expand Down
19 changes: 19 additions & 0 deletions Editor/MenuPaths.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace UniTools.Build
{
public static class MenuPaths
{
public const string Core = nameof(UniTools) + "/";
public const string IO = Core + "IO/";
public const string Pipelines = Core + "Pipelines/";

public const string Build = Core + "Build/";
public const string Defines = Build + "Defines/";
public const string Versioning = Build + "Versioning/";

private const string Platforms = Build + "Platforms/";
public const string Android = Platforms + "Android/";
public const string IOS = Platforms + "iOS/";
public const string Standalone = Platforms + "Standalone/";
public const string WebGL = Platforms + "WebGL/";
}
}
3 changes: 3 additions & 0 deletions Editor/MenuPaths.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Editor/Platforms/Android/Build/BuildApk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
using UnityEditor.Build.Reporting;
using UnityEngine;

namespace UniTools.Build.Android
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(BuildApk),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Android) + "/" + nameof(BuildApk)
menuName = MenuPaths.Android + nameof(BuildApk)
)]
public sealed class BuildApk : ScriptableBuildStepWithOptions
{

public override BuildTarget Target => BuildTarget.Android;

public override async Task<BuildReport> Execute()
Expand Down
2 changes: 1 addition & 1 deletion Editor/Platforms/Android/CustomEditors/SetAliasEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UnityEditor;

namespace UniTools.Build.Android
namespace UniTools.Build
{
[CustomEditor(typeof(SetAlias))]
public sealed class SetAliasEditor : Editor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UnityEditor;

namespace UniTools.Build.Android
namespace UniTools.Build
{
[CustomEditor(typeof(SetKeystorePassword))]
public sealed class SetKeystorePasswordEditor : Editor
Expand Down
4 changes: 2 additions & 2 deletions Editor/Platforms/Android/Pre/SetAlias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using UnityEditor.Build;
using UnityEngine;

namespace UniTools.Build.Android
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(SetAlias),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Android) + "/Pre/" + nameof(SetAlias)
menuName = MenuPaths.Android + nameof(SetAlias)
)]
public sealed class SetAlias : ScriptableCustomBuildStep
{
Expand Down
4 changes: 2 additions & 2 deletions Editor/Platforms/Android/Pre/SetDebugKeystore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using UnityEditor;
using UnityEngine;

namespace UniTools.Build.Android
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(SetDebugKeystore),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Android) + "/Pre/" + nameof(SetDebugKeystore)
menuName = MenuPaths.Android + nameof(SetDebugKeystore)
)]
public sealed class SetDebugKeystore : ScriptableCustomBuildStep
{
Expand Down
4 changes: 2 additions & 2 deletions Editor/Platforms/Android/Pre/SetKeystorePassword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using UnityEditor;
using UnityEngine;

namespace UniTools.Build.Android
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(SetKeystorePassword),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Android) + "/Pre/" + nameof(SetKeystorePassword)
menuName = MenuPaths.Android + nameof(SetKeystorePassword)
)]
public sealed class SetKeystorePassword : ScriptableCustomBuildStep
{
Expand Down
4 changes: 2 additions & 2 deletions Editor/Platforms/Standalone/Build/BuildMacOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
#endif
using UnityEngine;

namespace UniTools.Build.Standalone
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(BuildMacOS),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Standalone) + "/" + nameof(BuildMacOS)
menuName = MenuPaths.Standalone + nameof(BuildMacOS)
)]
public sealed class BuildMacOS : ScriptableBuildStepWithOptions
{
Expand Down
4 changes: 2 additions & 2 deletions Editor/Platforms/Standalone/Build/BuildWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using UnityEditor.Build.Reporting;
using UnityEngine;

namespace UniTools.Build.Standalone
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(BuildWindows),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Standalone) + "/" + nameof(BuildWindows)
menuName = MenuPaths.Standalone + nameof(BuildWindows)
)]
public sealed class BuildWindows : ScriptableBuildStepWithOptions
{
Expand Down
4 changes: 2 additions & 2 deletions Editor/Platforms/Standalone/Build/BuildWindows64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using UnityEditor.Build.Reporting;
using UnityEngine;

namespace UniTools.Build.Standalone
namespace UniTools.Build
{
[CreateAssetMenu(
fileName = nameof(BuildWindows64),
menuName = nameof(UniTools) + "/Build/Steps/" + nameof(Standalone) + "/" + nameof(BuildWindows64)
menuName = MenuPaths.Standalone + nameof(BuildWindows64)
)]
public sealed class BuildWindows64 : ScriptableBuildStepWithOptions
{
Expand Down
8 changes: 8 additions & 0 deletions Editor/Platforms/WebGL.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e22dadb

Please sign in to comment.