├── CREDITS.md
├── src
├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── ClusterInputManager.asset
│ ├── PresetManager.asset
│ ├── XRSettings.asset
│ ├── TimeManager.asset
│ ├── EditorBuildSettings.asset
│ ├── VFXManager.asset
│ ├── AudioManager.asset
│ ├── TagManager.asset
│ ├── EditorSettings.asset
│ ├── UnityConnectSettings.asset
│ ├── DynamicsManager.asset
│ ├── NavMeshAreas.asset
│ ├── Physics2DSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ ├── QualitySettings.asset
│ └── ProjectSettings.asset
├── Assets
│ ├── UnityCommandLine
│ │ ├── Editor
│ │ │ ├── AssetDatabase.meta
│ │ │ ├── BuildPipeline.meta
│ │ │ ├── CommandBase.cs.meta
│ │ │ ├── CommandUtils.cs.meta
│ │ │ ├── AssetDatabase
│ │ │ │ ├── Exposed.meta
│ │ │ │ ├── Values.cs.meta
│ │ │ │ ├── ExportPackageCommandBase.cs.meta
│ │ │ │ ├── ExportPackageSettings.cs.meta
│ │ │ │ ├── Exposed
│ │ │ │ │ ├── ExportPackageCommand.cs.meta
│ │ │ │ │ └── ExportPackageCommand.cs
│ │ │ │ ├── Values.cs
│ │ │ │ ├── ExportPackageSettings.cs
│ │ │ │ └── ExportPackageCommandBase.cs
│ │ │ ├── BuildPipeline
│ │ │ │ ├── Exposed.meta
│ │ │ │ ├── Values.cs.meta
│ │ │ │ ├── BuildPlayerSettings.cs.meta
│ │ │ │ ├── BuildReportUtils.cs.meta
│ │ │ │ ├── BuildTargetUtils.cs.meta
│ │ │ │ ├── BuildAssetBundlesSettings.cs.meta
│ │ │ │ ├── BuildPipelineCommandBase.cs.meta
│ │ │ │ ├── BuildPlayerCommandBase.cs.meta
│ │ │ │ ├── Exposed
│ │ │ │ │ ├── BuildIosCommand.cs.meta
│ │ │ │ │ ├── BuildPlayerCommand.cs.meta
│ │ │ │ │ ├── BuildAssetBundlesCommand.cs.meta
│ │ │ │ │ ├── BuildAssetBundlesCommand.cs
│ │ │ │ │ ├── BuildIosCommand.cs
│ │ │ │ │ └── BuildPlayerCommand.cs
│ │ │ │ ├── BuildAssetBundlesCommandBase.cs.meta
│ │ │ │ ├── BuildPipelineCommandBase.cs
│ │ │ │ ├── BuildAssetBundlesSettings.cs
│ │ │ │ ├── BuildAssetBundlesCommandBase.cs
│ │ │ │ ├── BuildPlayerSettings.cs
│ │ │ │ ├── Values.cs
│ │ │ │ ├── BuildTargetUtils.cs
│ │ │ │ ├── BuildReportUtils.cs
│ │ │ │ └── BuildPlayerCommandBase.cs
│ │ │ ├── Values.cs.meta
│ │ │ ├── Values.cs
│ │ │ ├── CommandUtils.cs
│ │ │ └── CommandBase.cs
│ │ └── Editor.meta
│ ├── Scenes
│ │ ├── White.unity.meta
│ │ └── White.unity
│ ├── Plugins.meta
│ ├── Scenes.meta
│ ├── AssetBundles.meta
│ ├── Plugins
│ │ ├── Editor
│ │ │ ├── JetBrains
│ │ │ │ ├── JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll
│ │ │ │ └── JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta
│ │ │ └── JetBrains.meta
│ │ └── Editor.meta
│ ├── UnityCommandLine.meta
│ └── AssetBundles
│ │ ├── DarkRed.mat.meta
│ │ ├── Red.mat.meta
│ │ ├── Red.mat
│ │ └── DarkRed.mat
├── .gitignore
├── Packages
│ └── manifest.json
└── .gitattributes
├── CONTRIBUTING.md
├── LICENSE
├── CODE_OF_CONDUCT.md
├── docs
└── CODING_STANDARDS.md
└── README.md
/CREDITS.md:
--------------------------------------------------------------------------------
1 | # Credits
--------------------------------------------------------------------------------
/src/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2019.1.0f2
2 | m_EditorVersionWithRevision: 2019.1.0f2 (292b93d75a2c)
3 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f27693f66bdb45ec93aac54cb17c496b
3 | timeCreated: 1558077663
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9865bafba903474f8aa0564eab0dc0ed
3 | timeCreated: 1557975611
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/CommandBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 25fd92bb667c4fe48950b88791bace6f
3 | timeCreated: 1557974374
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/CommandUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 609683cd4cbf42509cfc188e7aa7d085
3 | timeCreated: 1557975758
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/Exposed.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8402599fa7e44376b7a1ad3dc88edbeb
3 | timeCreated: 1558079520
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7bf468775e1e4fdc90a32dbb6165c0a2
3 | timeCreated: 1557984668
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/Values.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 188c1530a3314288a7eeaa769ae1fc2d
3 | timeCreated: 1558078222
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Values.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 32a411be0acd4cfd8e76a49df86d58dc
3 | timeCreated: 1557976140
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildPlayerSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 530c6378bd86475e8077dba5814a4e42
3 | timeCreated: 1557979336
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildReportUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4e608868231e43d98c32995e11edcead
3 | timeCreated: 1558003607
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildTargetUtils.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5e8baa5673b348adb4b06004026c537e
3 | timeCreated: 1557976582
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/ExportPackageCommandBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9068558b306b4c5b928416f2e8608824
3 | timeCreated: 1558077738
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/ExportPackageSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c43fcfb94ef84aecb7f1ec2532141f99
3 | timeCreated: 1558077854
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildAssetBundlesSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8ceacec11bb64c8cafbfbf7aa6d05fcd
3 | timeCreated: 1558322693
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildPipelineCommandBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e38b4cabe494d1ea20ed7b3b7c07461
3 | timeCreated: 1558324162
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildPlayerCommandBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 681b2a167e7c4340b129042d13466267
3 | timeCreated: 1557975637
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed/BuildIosCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d23b558fa75b425d94ee821684b06557
3 | timeCreated: 1558058600
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/Exposed/ExportPackageCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 90a0364968884926a806f3e084251d46
3 | timeCreated: 1558079529
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildAssetBundlesCommandBase.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 26b06bd2def849cf91160d85cbb49d61
3 | timeCreated: 1558322495
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed/BuildPlayerCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1786675967f24da5862e1b730ba7c645
3 | timeCreated: 1557984679
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed/BuildAssetBundlesCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 07e5330061064d40a60f6b264ff82d97
3 | timeCreated: 1558332696
--------------------------------------------------------------------------------
/src/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/src/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/src/Assets/Scenes/White.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 957211890e364044a9daa3e03a208d68
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/src/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a578cccef70bb3469165b0c3741c1d7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 921223b516ebdfb44a8522210e2b1cde
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/AssetBundles.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3fed57896196ef8409f54a577d7c6acd
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elmernocon/UnityCommandLine/HEAD/src/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll
--------------------------------------------------------------------------------
/src/Assets/Plugins/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f478da49779f67f409722cf34dd3cc3b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6109031cac8ce840b202a05fc895c67
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5b5f058168ad34f4c91c225665a3d7a2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/src/Assets/Plugins/Editor/JetBrains.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a35301062d15314bb52308759296d66
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/AssetBundles/DarkRed.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cdd9d5bd467d4b941a8b1b4049d177c6
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName: ab1/materials
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/Assets/AssetBundles/Red.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e4bcc0f8e003dac41bec34ad3a928513
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName: ab1/materials
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/src/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/Values.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 846ed6464eb4802469e61f15ff8c5446
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/src/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/White.unity
10 | guid: 957211890e364044a9daa3e03a208d68
11 | m_configObjects: {}
12 |
--------------------------------------------------------------------------------
/src/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------
/src/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 1024
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/src/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/src/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e28d77415895c243958e729730a3dfd
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 0
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 1
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/src/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 7
7 | m_ExternalVersionControlSupport: Hidden Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/Values.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: Values.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 |
12 | namespace UnityCommandLine
13 | {
14 | ///
15 | /// A container class for frequently used values in commands.
16 | ///
17 | public static class Values
18 | {
19 | #region Constants
20 |
21 | ///
22 | /// The separator string.
23 | ///
24 | public const string SEPARATOR = "-------------------------------------------------------------------------------";
25 |
26 | ///
27 | /// The default string comparison.
28 | ///
29 | public const StringComparison DEFAULT_STRING_COMPARISON = StringComparison.InvariantCultureIgnoreCase;
30 |
31 | #endregion
32 | }
33 | }
--------------------------------------------------------------------------------
/src/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 1
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed/BuildAssetBundlesCommand.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildAssetBundlesCommand.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/20
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using JetBrains.Annotations;
11 | using UnityCommandLine.BuildPipeline;
12 |
13 | ///
14 | /// Builds all asset bundles using the given .
15 | ///
16 | ///
17 | /// Example:
18 | /// -executeMethod BuildAssetBundlesCommand.Execute -buildTarget Win64
19 | ///
20 | public class BuildAssetBundlesCommand : BuildAssetBundlesCommandBase
21 | {
22 | #region Statics
23 |
24 | #region Static Methods
25 |
26 | ///
27 | /// Executes this command.
28 | ///
29 | [UsedImplicitly]
30 | public static void Execute()
31 | {
32 | var command = new BuildAssetBundlesCommand();
33 |
34 | command.Run();
35 | }
36 |
37 | #endregion
38 |
39 | #endregion
40 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/CommandUtils.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: CommandUtils.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System.IO;
11 |
12 | #if !NET_4_6
13 | using System.Linq;
14 | #endif
15 |
16 | namespace UnityCommandLine
17 | {
18 | ///
19 | /// A utility class container for methods used by commands.
20 | ///
21 | public static class CommandUtils
22 | {
23 | #region Statics
24 |
25 | #region Static Methods
26 |
27 | ///
28 | /// Combines two path strings.
29 | ///
30 | /// The paths.
31 | /// The new combined path.
32 | public static string PathCombine(params string[] args)
33 | {
34 | #if NET_4_6
35 | return Path.Combine(args);
36 | #else
37 | return args.Aggregate(Path.Combine);
38 | #endif
39 | }
40 |
41 | #endregion
42 |
43 | #endregion
44 | }
45 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/Exposed/ExportPackageCommand.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: ExportPackageCommand.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/17
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using JetBrains.Annotations;
12 | using UnityCommandLine.AssetDatabase;
13 |
14 | ///
15 | /// Export a package.
16 | ///
17 | ///
18 | /// Example:
19 | /// -executeMethod ExportPackageCommand.Execute -packageContents "Asset1.png,Asset2.png,Folder1,Folder2" -packageName HelloWorld
20 | ///
21 | public class ExportPackageCommand : ExportPackageCommandBase
22 | {
23 | #region Statics
24 |
25 | #region Static Methods
26 |
27 | ///
28 | /// Executes this command.
29 | ///
30 | ///
31 | [UsedImplicitly]
32 | public static void Execute()
33 | {
34 | var command = new ExportPackageCommand();
35 |
36 | command.Run();
37 | }
38 |
39 | #endregion
40 |
41 | #endregion
42 | }
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution Guidelines
2 |
3 | By contributing to this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md).
4 | You also agree that by submitting a `pull request` for this project, your contribution will be licensed under the [MIT Licence](LICENSE) for this project.
5 |
6 | `Fork` and `Clone` the `UnityCommandLine` repo.
7 |
8 | Make sure that the tests pass locally.
9 |
10 | Make your changes.
11 |
12 | Add tests for your change. Make those tests pass locally.
13 |
14 | Push to your `Fork` and submit a `pull request`.
15 |
16 | Your `pull request` will have a better chance of being accepted if you do the following:
17 |
18 | * Follow our [Coding Standards](docs/CODING_STANDARDS.md).
19 |
20 | * Send one `pull request` for each new feature.
21 |
22 | * Write tests for each change or new feature. (although it may not be always possible)
23 |
24 | * Write a good [Commit Message](https://chris.beams.io/posts/git-commit/).
25 |
26 | * Read on [Github Flow](https://githubflow.github.io/).
27 |
28 | * Read on [Atomic Commits](https://seesparkbox.com/foundry/atomic_commits_with_git).
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Elmer Nocon
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/unity
3 | # Edit at https://www.gitignore.io/?templates=unity
4 |
5 | ### Unity ###
6 | [Ll]ibrary/
7 | [Tt]emp/
8 | [Oo]bj/
9 | [Bb]uild/
10 | [Bb]uilds/
11 | [Ll]ogs/
12 | [Aa]ssetBundles/
13 | [Uu]nityPackages/
14 | editor.log
15 |
16 | # Never ignore Asset meta data
17 | !*/[Aa]ssets/**/*.meta
18 |
19 | # Uncomment this line if you wish to ignore the asset store tools plugin
20 | # [Aa]ssets/AssetStoreTools*
21 |
22 | # TextMesh Pro files
23 | [Aa]ssets/TextMesh*Pro/
24 |
25 | # Visual Studio cache directory
26 | .vs/
27 |
28 | # Gradle cache directory
29 | .gradle/
30 |
31 | # Autogenerated VS/MD/Consulo solution and project files
32 | ExportedObj/
33 | .consulo/
34 | *.csproj
35 | *.unityproj
36 | *.sln
37 | *.suo
38 | *.tmp
39 | *.user
40 | *.userprefs
41 | *.pidb
42 | *.booproj
43 | *.svd
44 | *.pdb
45 | *.mdb
46 | *.opendb
47 | *.VC.db
48 |
49 | # Unity3D generated meta files
50 | *.pidb.meta
51 | *.pdb.meta
52 | *.mdb.meta
53 |
54 | # Unity3D generated file on crash reports
55 | sysinfo.txt
56 |
57 | # Builds
58 | *.apk
59 | *.unitypackage
60 |
61 | # Crashlytics generated file
62 | crashlytics-build.properties
63 |
64 |
65 | # End of https://www.gitignore.io/api/unity
--------------------------------------------------------------------------------
/src/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed/BuildIosCommand.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildIosCommand.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/17
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using UnityCommandLine.BuildPipeline;
11 | using JetBrains.Annotations;
12 | using UnityCommandLine;
13 | using UnityEditor;
14 | using Values = UnityCommandLine.BuildPipeline.Values;
15 |
16 | ///
17 | /// Builds an iOS player using the given .
18 | ///
19 | ///
20 | /// Example:
21 | /// -executeMethod BuildIosCommand.Execute
22 | ///
23 | public class BuildIosCommand : BuildPlayerCommandBase
24 | {
25 | #region Statics
26 |
27 | #region Static Methods
28 |
29 | ///
30 | /// Executes this command.
31 | ///
32 | [UsedImplicitly]
33 | public static void Execute()
34 | {
35 | var command = new BuildIosCommand(BuildTarget.iOS);
36 |
37 | command.Run();
38 | }
39 |
40 | #endregion
41 |
42 | #endregion
43 |
44 | #region Constructors & Destructors
45 |
46 | ///
47 | /// Creates an instance of .
48 | ///
49 | /// The build target.
50 | protected BuildIosCommand(BuildTarget target) : base(target)
51 | {
52 | }
53 |
54 | #endregion
55 |
56 | #region Methods
57 |
58 | ///
59 | protected override string GetOutputPath(string outputFileName)
60 | {
61 | return CommandUtils.PathCombine(Values.DEFAULT_BUILD_FOLDER_NAME, Settings.Target.ToString());
62 | }
63 |
64 | #endregion
65 | }
--------------------------------------------------------------------------------
/src/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/src/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ads": "2.0.8",
4 | "com.unity.analytics": "3.3.2",
5 | "com.unity.collab-proxy": "1.2.16",
6 | "com.unity.package-manager-ui": "2.1.2",
7 | "com.unity.purchasing": "2.0.6",
8 | "com.unity.textmeshpro": "2.0.0",
9 | "com.unity.timeline": "1.0.0",
10 | "com.unity.modules.ai": "1.0.0",
11 | "com.unity.modules.animation": "1.0.0",
12 | "com.unity.modules.assetbundle": "1.0.0",
13 | "com.unity.modules.audio": "1.0.0",
14 | "com.unity.modules.cloth": "1.0.0",
15 | "com.unity.modules.director": "1.0.0",
16 | "com.unity.modules.imageconversion": "1.0.0",
17 | "com.unity.modules.imgui": "1.0.0",
18 | "com.unity.modules.jsonserialize": "1.0.0",
19 | "com.unity.modules.particlesystem": "1.0.0",
20 | "com.unity.modules.physics": "1.0.0",
21 | "com.unity.modules.physics2d": "1.0.0",
22 | "com.unity.modules.screencapture": "1.0.0",
23 | "com.unity.modules.terrain": "1.0.0",
24 | "com.unity.modules.terrainphysics": "1.0.0",
25 | "com.unity.modules.tilemap": "1.0.0",
26 | "com.unity.modules.ui": "1.0.0",
27 | "com.unity.modules.uielements": "1.0.0",
28 | "com.unity.modules.umbra": "1.0.0",
29 | "com.unity.modules.unityanalytics": "1.0.0",
30 | "com.unity.modules.unitywebrequest": "1.0.0",
31 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
32 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
33 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
34 | "com.unity.modules.unitywebrequestwww": "1.0.0",
35 | "com.unity.modules.vehicles": "1.0.0",
36 | "com.unity.modules.video": "1.0.0",
37 | "com.unity.modules.vr": "1.0.0",
38 | "com.unity.modules.wind": "1.0.0",
39 | "com.unity.modules.xr": "1.0.0"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Exposed/BuildPlayerCommand.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildPlayerCommand.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using UnityCommandLine.BuildPipeline;
12 | using JetBrains.Annotations;
13 | using UnityEditor;
14 |
15 | ///
16 | /// Builds a player using the given .
17 | ///
18 | ///
19 | /// Example:
20 | /// -executeMethod BuildPlayerCommand.Execute -buildTarget win64
21 | ///
22 | public class BuildPlayerCommand : BuildPlayerCommandBase
23 | {
24 | #region Statics
25 |
26 | #region Static Methods
27 |
28 | ///
29 | /// Executes this command.
30 | ///
31 | ///
32 | [UsedImplicitly]
33 | public static void Execute()
34 | {
35 | var arguments = GetArguments();
36 |
37 | string buildTargetString;
38 | if (!GetArgumentValue(arguments, Values.ARG_BUILD_TARGET, out buildTargetString))
39 | throw new Exception(string.Format("Argument '{0}' is required.", Values.ARG_BUILD_TARGET));
40 |
41 | var buildTarget = buildTargetString.ToBuildTarget();
42 |
43 | var command = new BuildPlayerCommand(buildTarget);
44 |
45 | command.Run();
46 | }
47 |
48 | #endregion
49 |
50 | #endregion
51 |
52 | #region Constructors & Destructors
53 |
54 | ///
55 | /// Creates an instance of .
56 | ///
57 | /// The build target.
58 | protected BuildPlayerCommand(BuildTarget target) : base(target)
59 | {
60 | }
61 |
62 | #endregion
63 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildPipelineCommandBase.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildPipelineCommandBase.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/20
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using UnityEditor;
11 | using UBuildPipeline = UnityEditor.BuildPipeline;
12 |
13 | namespace UnityCommandLine.BuildPipeline
14 | {
15 | ///
16 | /// ///
17 | ///
18 | /// The base class for all build-pipeline-related commands executable through Unity's command line interface.
19 | ///
20 | ///
21 | public abstract class BuildPipelineCommandBase : CommandBase
22 | {
23 | #region Statics
24 |
25 | #region Static Methods
26 |
27 | ///
28 | /// Checks whether the editor is currently building a player.
29 | ///
30 | /// Returns true if the editor is busy, otherwise false.
31 | protected static bool IsBuildPipelineBusy()
32 | {
33 | return UBuildPipeline.isBuildingPlayer;
34 | }
35 |
36 | ///
37 | /// Checks whether the editor supports the build target.
38 | ///
39 | /// The build target group.
40 | /// The build target.
41 | /// Returns true if the build target is supported, otherwise false.
42 | protected static bool IsBuildTargetSupported(BuildTargetGroup targetGroup, BuildTarget target)
43 | {
44 | #if UNITY_2018_1_OR_NEWER
45 | return UBuildPipeline.IsBuildTargetSupported(targetGroup, target);
46 | #else
47 | return true;
48 | #endif
49 | }
50 |
51 | #endregion
52 |
53 | #endregion
54 | }
55 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/Values.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: Values.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/17
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using UnityEditor;
11 |
12 | namespace UnityCommandLine.AssetDatabase
13 | {
14 | ///
15 | /// A container class for frequently used values in export-package-related commands.
16 | ///
17 | public static class Values
18 | {
19 | #region Constants
20 |
21 | ///
22 | /// The default package folder name.
23 | ///
24 | public const string DEFAULT_PACKAGE_FOLDER_NAME = "UnityPackages";
25 |
26 | ///
27 | /// The default package file name.
28 | ///
29 | public const string DEFAULT_PACKAGE_NAME = "package";
30 |
31 | ///
32 | /// The default export package options.
33 | ///
34 | public const ExportPackageOptions DEFAULT_PACKAGE_OPTIONS = ExportPackageOptions.Default;
35 |
36 | ///
37 | /// The argument key for the package contents.
38 | ///
39 | public const string ARG_PACKAGE_CONTENTS = "-packageContents";
40 |
41 | ///
42 | /// The argument key for the package file name.
43 | ///
44 | public const string ARG_PACKAGE_NAME = "-packageName";
45 |
46 | ///
47 | /// The argument switch for .
48 | ///
49 | public const string ARG_RECURSE = "-optionRecurse";
50 |
51 | ///
52 | /// The argument switch for .
53 | ///
54 | public const string ARG_INCLUDE_DEPENDENCIES = "-optionIncludeDependencies";
55 |
56 | ///
57 | /// The argument switch for .
58 | ///
59 | public const string ARG_INCLUDE_LIBRARY_ASSETS = "-optionIncludeLibraryAssets";
60 |
61 | #endregion
62 | }
63 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildAssetBundlesSettings.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildAssetBundlesSettings.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/20
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System.Text;
11 | using UnityEditor;
12 |
13 | namespace UnityCommandLine.BuildPipeline
14 | {
15 | ///
16 | /// A container class for all values used when building asset bundles.
17 | ///
18 | public class BuildAssetBundlesSettings
19 | {
20 | #region Statics
21 |
22 | #region Static Methods
23 |
24 | ///
25 | /// Prints the values of a instance.
26 | ///
27 | /// The build asset bundles settings instance.
28 | /// The string builder instance.
29 | public static void Print(BuildAssetBundlesSettings settings, StringBuilder stringBuilder)
30 | {
31 | if (!string.IsNullOrEmpty(settings.OutputPath))
32 | stringBuilder.AppendLine(string.Format("OutputPath: {0}", settings.OutputPath));
33 |
34 | if (settings.Options != BuildAssetBundleOptions.None)
35 | stringBuilder.AppendLine(string.Format("Options: {0}", settings.Options));
36 |
37 | stringBuilder.AppendLine(string.Format("TargetPlatform: {0}", settings.TargetPlatform));
38 | }
39 |
40 | #endregion
41 |
42 | #endregion
43 |
44 | #region Properties
45 |
46 | ///
47 | /// Gets and sets the output path.
48 | ///
49 | public string OutputPath { get; set; }
50 |
51 | ///
52 | /// Gets and sets the build asset bundles options to use when building asset bundles.
53 | ///
54 | public BuildAssetBundleOptions Options { get; set; }
55 |
56 | ///
57 | /// Gets and sets the target platform.
58 | ///
59 | public BuildTarget TargetPlatform { get; set; }
60 |
61 | #endregion
62 | }
63 | }
--------------------------------------------------------------------------------
/src/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/src/Assets/AssetBundles/Red.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Red
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 0, b: 0, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/src/Assets/AssetBundles/DarkRed.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: DarkRed
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.75, g: 0, b: 0, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/ExportPackageSettings.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: Settings.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/17
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System.Text;
11 | using UnityEditor;
12 |
13 | namespace UnityCommandLine.AssetDatabase
14 | {
15 | ///
16 | /// A container class for all values used when exporting a package.
17 | ///
18 | public class ExportPackageSettings
19 | {
20 | #region Statics
21 |
22 | #region Static Methods
23 |
24 | ///
25 | /// Prints the values of a instance.
26 | ///
27 | /// The export package settings instance.
28 | /// The string builder instance.
29 | public static void Print(ExportPackageSettings settings, StringBuilder stringBuilder)
30 | {
31 | const string listItemPrefix = " - ";
32 |
33 | if (settings.AssetPathNames != null && settings.AssetPathNames.Length > 0)
34 | stringBuilder.AppendLine(string.Format("AssetPathNames:\n{0}{1}", listItemPrefix, string.Join(
35 | string.Format("\n{0}", listItemPrefix), settings.AssetPathNames)));
36 |
37 | if (!string.IsNullOrEmpty(settings.OutputPath))
38 | stringBuilder.AppendLine(string.Format("OutputPath: {0}", settings.OutputPath));
39 |
40 | if (settings.Options != ExportPackageOptions.Default)
41 | stringBuilder.AppendLine(string.Format("Options: {0}", settings.Options));
42 | }
43 |
44 | #endregion
45 |
46 | #endregion
47 |
48 | #region Properties
49 |
50 | ///
51 | /// Gets and sets the list of asset path names to include in the package.
52 | ///
53 | public string[] AssetPathNames { get; set; }
54 |
55 | ///
56 | /// Gets and sets the output path.
57 | ///
58 | public string OutputPath { get; set; }
59 |
60 | ///
61 | /// Gets and sets the export package options to use when exporting the package.
62 | ///
63 | public ExportPackageOptions Options { get; set; }
64 |
65 | #endregion
66 | }
67 | }
--------------------------------------------------------------------------------
/src/.gitattributes:
--------------------------------------------------------------------------------
1 | ## Others ##
2 | *.cs diff=csharp text
3 | *.cginc text
4 | *.shader text
5 |
6 | ## git-lfs ##
7 |
8 | # 3D
9 | *.3dm filter=lfs diff=lfs merge=lfs -text
10 | *.3ds filter=lfs diff=lfs merge=lfs -text
11 | *.blend filter=lfs diff=lfs merge=lfs -text
12 | *.c4d filter=lfs diff=lfs merge=lfs -text
13 | *.collada filter=lfs diff=lfs merge=lfs -text
14 | *.dae filter=lfs diff=lfs merge=lfs -text
15 | *.dxf filter=lfs diff=lfs merge=lfs -text
16 | *.fbx filter=lfs diff=lfs merge=lfs -text
17 | *.jas filter=lfs diff=lfs merge=lfs -text
18 | *.lws filter=lfs diff=lfs merge=lfs -text
19 | *.lxo filter=lfs diff=lfs merge=lfs -text
20 | *.ma filter=lfs diff=lfs merge=lfs -text
21 | *.max filter=lfs diff=lfs merge=lfs -text
22 | *.mb filter=lfs diff=lfs merge=lfs -text
23 | *.obj filter=lfs diff=lfs merge=lfs -text
24 | *.ply filter=lfs diff=lfs merge=lfs -text
25 | *.skp filter=lfs diff=lfs merge=lfs -text
26 | *.stl filter=lfs diff=lfs merge=lfs -text
27 | *.ztl filter=lfs diff=lfs merge=lfs -text
28 |
29 | # Audio
30 | *.aif filter=lfs diff=lfs merge=lfs -text
31 | *.aiff filter=lfs diff=lfs merge=lfs -text
32 | *.it filter=lfs diff=lfs merge=lfs -text
33 | *.mod filter=lfs diff=lfs merge=lfs -text
34 | *.mp3 filter=lfs diff=lfs merge=lfs -text
35 | *.ogg filter=lfs diff=lfs merge=lfs -text
36 | *.reason filter=lfs diff=lfs merge=lfs -text
37 | *.rns filter=lfs diff=lfs merge=lfs -text
38 | *.s3m filter=lfs diff=lfs merge=lfs -text
39 | *.wav filter=lfs diff=lfs merge=lfs -text
40 | *.xm filter=lfs diff=lfs merge=lfs -text
41 |
42 | # Fonts
43 | *.otf filter=lfs diff=lfs merge=lfs -text
44 | *.ttf filter=lfs diff=lfs merge=lfs -text
45 |
46 | # Image
47 | *.ai filter=lfs diff=lfs merge=lfs -text
48 | *.bmp filter=lfs diff=lfs merge=lfs -text
49 | *.cubemap filter=lfs diff=lfs merge=lfs -text
50 | *.exr filter=lfs diff=lfs merge=lfs -text
51 | *.gif filter=lfs diff=lfs merge=lfs -text
52 | *.hdr filter=lfs diff=lfs merge=lfs -text
53 | *.iff filter=lfs diff=lfs merge=lfs -text
54 | *.jpg filter=lfs diff=lfs merge=lfs -text
55 | *.jpeg filter=lfs diff=lfs merge=lfs -text
56 | *.pict filter=lfs diff=lfs merge=lfs -text
57 | *.png filter=lfs diff=lfs merge=lfs -text
58 | *.psd filter=lfs diff=lfs merge=lfs -text
59 | *.tga filter=lfs diff=lfs merge=lfs -text
60 | *.tif filter=lfs diff=lfs merge=lfs -text
61 | *.tiff filter=lfs diff=lfs merge=lfs -text
62 |
63 | # Video
64 | *.mov filter=lfs diff=lfs merge=lfs -text
65 | *.mp4 filter=lfs diff=lfs merge=lfs -text
--------------------------------------------------------------------------------
/src/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
40 | m_PreloadedShaders: []
41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
42 | type: 0}
43 | m_CustomRenderPipeline: {fileID: 0}
44 | m_TransparencySortMode: 0
45 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
46 | m_DefaultRenderingPath: 1
47 | m_DefaultMobileRenderingPath: 1
48 | m_TierSettings: []
49 | m_LightmapStripping: 0
50 | m_FogStripping: 0
51 | m_InstancingStripping: 0
52 | m_LightmapKeepPlain: 1
53 | m_LightmapKeepDirCombined: 1
54 | m_LightmapKeepDynamicPlain: 1
55 | m_LightmapKeepDynamicDirCombined: 1
56 | m_LightmapKeepShadowMask: 1
57 | m_LightmapKeepSubtractive: 1
58 | m_FogKeepLinear: 1
59 | m_FogKeepExp: 1
60 | m_FogKeepExp2: 1
61 | m_AlbedoSwatchInfos: []
62 | m_LightsUseLinearIntensity: 0
63 | m_LightsUseColorTemperature: 0
64 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at elmernocon@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/AssetDatabase/ExportPackageCommandBase.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: ExportPackageCommandBase.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/17
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using System.IO;
12 | using System.Linq;
13 | using System.Text;
14 | using UnityEditor;
15 | using UnityEngine;
16 |
17 | namespace UnityCommandLine.AssetDatabase
18 | {
19 | ///
20 | ///
21 | /// The base class for all export-package-related commands executable through Unity's command line interface.
22 | ///
23 | public abstract class ExportPackageCommandBase : CommandBase
24 | {
25 | #region Statics
26 |
27 | #region Static Methods
28 |
29 | ///
30 | /// Exports a package.
31 | ///
32 | /// The export package settings.
33 | private static void ExportPackage(ExportPackageSettings settings)
34 | {
35 | UnityEditor.AssetDatabase.ExportPackage(settings.AssetPathNames, settings.OutputPath, settings.Options);
36 | }
37 |
38 | ///
39 | /// Print a object.
40 | ///
41 | /// The export package settings object.
42 | /// The title.
43 | private static void PrintSettings(ExportPackageSettings settings, string title = null)
44 | {
45 | var stringBuilder = new StringBuilder();
46 |
47 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
48 | if (!string.IsNullOrEmpty(title)) stringBuilder.AppendLine(title);
49 | ExportPackageSettings.Print(settings, stringBuilder);
50 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
51 |
52 | PrintLine(stringBuilder.ToString());
53 | }
54 |
55 | #endregion
56 |
57 | #endregion
58 |
59 | #region Fields
60 |
61 | ///
62 | /// The export package settings to use when exporting the package.
63 | ///
64 | protected readonly ExportPackageSettings Settings;
65 |
66 | #endregion
67 |
68 | #region Constructors & Destructors
69 |
70 | ///
71 | ///
72 | /// Creates an instance of .
73 | ///
74 | protected ExportPackageCommandBase()
75 | {
76 | Settings = new ExportPackageSettings();
77 | }
78 |
79 | #endregion
80 |
81 | #region Methods
82 |
83 | ///
84 | public override void Run()
85 | {
86 | InitArgs();
87 |
88 | PrintSettings(Settings, "Exporting:");
89 |
90 | ExportPackage(Settings);
91 | }
92 |
93 | ///
94 | /// Gets the output path.
95 | ///
96 | /// The output file name.
97 | /// Returns the output path.
98 | protected virtual string GetOutputPath(string outputFileName)
99 | {
100 | const string fileExtension = ".unitypackage";
101 |
102 | var directoryPath = CommandUtils.PathCombine(Path.GetDirectoryName(Application.dataPath), Values.DEFAULT_PACKAGE_FOLDER_NAME);
103 |
104 | if (!Directory.Exists(directoryPath))
105 | Directory.CreateDirectory(directoryPath);
106 |
107 | return CommandUtils.PathCombine(directoryPath,
108 | string.Format("{0}{1}", outputFileName, fileExtension));
109 | }
110 |
111 | ///
112 | /// Initializes the arguments used by this command.
113 | ///
114 | private void InitArgs()
115 | {
116 | // Set the package name if there is one.
117 | string packageName;
118 | if (!GetArgumentValue(Values.ARG_PACKAGE_NAME, out packageName))
119 | packageName = Values.DEFAULT_PACKAGE_NAME;
120 |
121 | // Set the package output path.
122 | Settings.OutputPath = GetOutputPath(packageName);
123 |
124 | string packageContentsString;
125 | string[] packageContents = null;
126 | if (GetArgumentValue(Values.ARG_PACKAGE_CONTENTS, out packageContentsString))
127 | packageContents = packageContentsString.Split(',')
128 | .Where(content => File.Exists(content) || Directory.Exists(content))
129 | .ToArray();
130 |
131 | if (packageContents == null || packageContents.Length == 0)
132 | throw new Exception("No package contents were selected.");
133 |
134 | // Set the asset path names.
135 | Settings.AssetPathNames = packageContents;
136 |
137 | // Set the initial build option.
138 | Settings.Options = Values.DEFAULT_PACKAGE_OPTIONS;
139 |
140 | // Set additional package options to use in the package.
141 | if (HasArgument(Values.ARG_RECURSE))
142 | Settings.Options |= ExportPackageOptions.Recurse;
143 |
144 | if (HasArgument(Values.ARG_INCLUDE_DEPENDENCIES))
145 | Settings.Options |= ExportPackageOptions.IncludeDependencies;
146 |
147 | if (HasArgument(Values.ARG_INCLUDE_LIBRARY_ASSETS))
148 | Settings.Options |= ExportPackageOptions.IncludeLibraryAssets;
149 | }
150 |
151 | #endregion
152 | }
153 | }
--------------------------------------------------------------------------------
/src/Assets/Scenes/White.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 0}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 1
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 1
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_AtlasSize: 1024
61 | m_AO: 0
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 512
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 256
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 1
83 | m_PVRDenoiserTypeDirect: 1
84 | m_PVRDenoiserTypeIndirect: 1
85 | m_PVRDenoiserTypeAO: 1
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 1
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ShowResolutionOverlay: 1
98 | m_ExportTrainingData: 0
99 | m_LightingDataAsset: {fileID: 0}
100 | m_UseShadowmask: 1
101 | --- !u!196 &4
102 | NavMeshSettings:
103 | serializedVersion: 2
104 | m_ObjectHideFlags: 0
105 | m_BuildSettings:
106 | serializedVersion: 2
107 | agentTypeID: 0
108 | agentRadius: 0.5
109 | agentHeight: 2
110 | agentSlope: 45
111 | agentClimb: 0.4
112 | ledgeDropHeight: 0
113 | maxJumpAcrossDistance: 0
114 | minRegionArea: 2
115 | manualCellSize: 0
116 | cellSize: 0.16666667
117 | manualTileSize: 0
118 | tileSize: 256
119 | accuratePlacement: 0
120 | debug:
121 | m_Flags: 0
122 | m_NavMeshData: {fileID: 0}
123 | --- !u!1 &354602467
124 | GameObject:
125 | m_ObjectHideFlags: 0
126 | m_CorrespondingSourceObject: {fileID: 0}
127 | m_PrefabInstance: {fileID: 0}
128 | m_PrefabAsset: {fileID: 0}
129 | serializedVersion: 6
130 | m_Component:
131 | - component: {fileID: 354602469}
132 | - component: {fileID: 354602468}
133 | m_Layer: 0
134 | m_Name: Main Camera
135 | m_TagString: MainCamera
136 | m_Icon: {fileID: 0}
137 | m_NavMeshLayer: 0
138 | m_StaticEditorFlags: 0
139 | m_IsActive: 1
140 | --- !u!20 &354602468
141 | Camera:
142 | m_ObjectHideFlags: 0
143 | m_CorrespondingSourceObject: {fileID: 0}
144 | m_PrefabInstance: {fileID: 0}
145 | m_PrefabAsset: {fileID: 0}
146 | m_GameObject: {fileID: 354602467}
147 | m_Enabled: 1
148 | serializedVersion: 2
149 | m_ClearFlags: 2
150 | m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
151 | m_projectionMatrixMode: 1
152 | m_GateFitMode: 2
153 | m_FOVAxisMode: 0
154 | m_SensorSize: {x: 36, y: 24}
155 | m_LensShift: {x: 0, y: 0}
156 | m_FocalLength: 50
157 | m_NormalizedViewPortRect:
158 | serializedVersion: 2
159 | x: 0
160 | y: 0
161 | width: 1
162 | height: 1
163 | near clip plane: 0.3
164 | far clip plane: 1000
165 | field of view: 60
166 | orthographic: 0
167 | orthographic size: 5
168 | m_Depth: -1
169 | m_CullingMask:
170 | serializedVersion: 2
171 | m_Bits: 4294967295
172 | m_RenderingPath: -1
173 | m_TargetTexture: {fileID: 0}
174 | m_TargetDisplay: 0
175 | m_TargetEye: 3
176 | m_HDR: 0
177 | m_AllowMSAA: 0
178 | m_AllowDynamicResolution: 0
179 | m_ForceIntoRT: 0
180 | m_OcclusionCulling: 0
181 | m_StereoConvergence: 10
182 | m_StereoSeparation: 0.022
183 | --- !u!4 &354602469
184 | Transform:
185 | m_ObjectHideFlags: 0
186 | m_CorrespondingSourceObject: {fileID: 0}
187 | m_PrefabInstance: {fileID: 0}
188 | m_PrefabAsset: {fileID: 0}
189 | m_GameObject: {fileID: 354602467}
190 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
191 | m_LocalPosition: {x: 0, y: 1, z: -10}
192 | m_LocalScale: {x: 1, y: 1, z: 1}
193 | m_Children: []
194 | m_Father: {fileID: 0}
195 | m_RootOrder: 0
196 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
197 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/CommandBase.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: CommandBase.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using System.Linq;
12 | using UnityEngine;
13 |
14 | namespace UnityCommandLine
15 | {
16 | ///
17 | /// The base class for all commands executable through Unity's command line interface.
18 | ///
19 | ///
20 | /// Example:
21 | /// -executeMethod CommandClassName.Execute
22 | ///
23 | public abstract class CommandBase
24 | {
25 | #region Statics
26 |
27 | #region Static Fields
28 |
29 | private static readonly Func StringComparer = (s1, s2) => s1.Contains(s2);
30 |
31 | #endregion
32 |
33 | #region Static Methods
34 |
35 | ///
36 | /// Gets the arguments passed along with this command.
37 | ///
38 | ///
39 | protected static string[] GetArguments()
40 | {
41 | return Environment.GetCommandLineArgs();
42 | }
43 |
44 | ///
45 | /// Tries to get the value (the next argument) of the given argument [key].
46 | ///
47 | /// The arguments.
48 | /// The argument to use as a key.
49 | /// The argument value to retrieve.
50 | /// The string comparison to use.
51 | /// Returns true if a valid argument value candidate was found, otherwise false.
52 | protected static bool GetArgumentValue(string[] arguments, string argumentKey, out string argumentValue,
53 | StringComparison comparisonType = Values.DEFAULT_STRING_COMPARISON)
54 | {
55 | var argumentsLength = arguments.Length;
56 |
57 | for (var i = 0; i < argumentsLength; i++)
58 | {
59 | var arg = arguments[i];
60 |
61 | if (!StringComparer(arg, argumentKey))
62 | continue;
63 |
64 | var search = $"{argumentKey}=";
65 |
66 | if (arg.Contains(search))
67 | {
68 | var idx = arg.IndexOf(search, StringComparison.Ordinal);
69 | var val = arg.Substring(idx + search.Length);
70 |
71 | if (!string.IsNullOrEmpty(val))
72 | {
73 | argumentValue = val;
74 | return true;
75 | }
76 | }
77 |
78 | if (i < argumentsLength - 1)
79 | {
80 | argumentValue = arguments[i + 1];
81 | return true;
82 | }
83 |
84 | break;
85 | }
86 |
87 | argumentValue = null;
88 | return false;
89 | }
90 |
91 | ///
92 | /// Checks whether the given argument was passed along with this command.
93 | ///
94 | /// The arguments.
95 | /// The argument to check.
96 | /// The string comparison to use.
97 | /// Returns true if the given argument was found, otherwise false.
98 | protected static bool HasArgument(string[] arguments, string argument, StringComparison comparisonType = Values.DEFAULT_STRING_COMPARISON)
99 | {
100 | return arguments.Any(arg => StringComparer(arg, argument));
101 | }
102 |
103 | ///
104 | /// Prints the message.
105 | ///
106 | /// The message.
107 | protected static void Print(string message = "")
108 | {
109 | Debug.Log(message);
110 | }
111 |
112 | ///
113 | /// Prints the message followed by a line terminator.
114 | ///
115 | /// The message.
116 | protected static void PrintLine(string message = "")
117 | {
118 | Debug.Log(message);
119 | }
120 |
121 | ///
122 | /// Prints a separator.
123 | ///
124 | protected static void PrintSeparator()
125 | {
126 | PrintLine(Values.SEPARATOR);
127 | }
128 |
129 | #endregion
130 |
131 | #endregion
132 |
133 | #region Fields
134 |
135 | private readonly string[] _arguments;
136 |
137 | #endregion
138 |
139 | #region Constructors & Destructors
140 |
141 | ///
142 | /// Creates an instance of .
143 | ///
144 | protected CommandBase()
145 | {
146 | // Get the arguments.
147 | _arguments = GetArguments();
148 | }
149 |
150 | #endregion
151 |
152 | #region Methods
153 |
154 | ///
155 | /// The method to run when the command is executed.
156 | ///
157 | public abstract void Run();
158 |
159 | ///
160 | /// Tries to get the value (the next argument) of the given argument [key].
161 | ///
162 | /// The argument to use as a key.
163 | /// The argument value to retrieve.
164 | /// The string comparison to use.
165 | /// Returns true if a valid argument value candidate was found, otherwise false.
166 | protected bool GetArgumentValue(string argumentKey, out string argumentValue,
167 | StringComparison comparisonType = Values.DEFAULT_STRING_COMPARISON)
168 | {
169 | return GetArgumentValue(_arguments, argumentKey, out argumentValue, comparisonType);
170 | }
171 |
172 | ///
173 | /// Checks whether the given argument was passed along with this command.
174 | ///
175 | /// The argument to check.
176 | /// The string comparison to use.
177 | /// Returns true if the given argument was found, otherwise false.
178 | protected bool HasArgument(string argument, StringComparison comparisonType = Values.DEFAULT_STRING_COMPARISON)
179 | {
180 | return HasArgument(_arguments, argument, comparisonType);
181 | }
182 |
183 | #endregion
184 | }
185 | }
--------------------------------------------------------------------------------
/src/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/src/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | excludedTargetPlatforms: []
44 | - serializedVersion: 2
45 | name: Low
46 | pixelLightCount: 0
47 | shadows: 0
48 | shadowResolution: 0
49 | shadowProjection: 1
50 | shadowCascades: 1
51 | shadowDistance: 20
52 | shadowNearPlaneOffset: 3
53 | shadowCascade2Split: 0.33333334
54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
55 | shadowmaskMode: 0
56 | blendWeights: 2
57 | textureQuality: 0
58 | anisotropicTextures: 0
59 | antiAliasing: 0
60 | softParticles: 0
61 | softVegetation: 0
62 | realtimeReflectionProbes: 0
63 | billboardsFaceCameraPosition: 0
64 | vSyncCount: 0
65 | lodBias: 0.4
66 | maximumLODLevel: 0
67 | streamingMipmapsActive: 0
68 | streamingMipmapsAddAllCameras: 1
69 | streamingMipmapsMemoryBudget: 512
70 | streamingMipmapsRenderersPerFrame: 512
71 | streamingMipmapsMaxLevelReduction: 2
72 | streamingMipmapsMaxFileIORequests: 1024
73 | particleRaycastBudget: 16
74 | asyncUploadTimeSlice: 2
75 | asyncUploadBufferSize: 16
76 | asyncUploadPersistentBuffer: 1
77 | resolutionScalingFixedDPIFactor: 1
78 | excludedTargetPlatforms: []
79 | - serializedVersion: 2
80 | name: Medium
81 | pixelLightCount: 1
82 | shadows: 1
83 | shadowResolution: 0
84 | shadowProjection: 1
85 | shadowCascades: 1
86 | shadowDistance: 20
87 | shadowNearPlaneOffset: 3
88 | shadowCascade2Split: 0.33333334
89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
90 | shadowmaskMode: 0
91 | blendWeights: 2
92 | textureQuality: 0
93 | anisotropicTextures: 1
94 | antiAliasing: 0
95 | softParticles: 0
96 | softVegetation: 0
97 | realtimeReflectionProbes: 0
98 | billboardsFaceCameraPosition: 0
99 | vSyncCount: 1
100 | lodBias: 0.7
101 | maximumLODLevel: 0
102 | streamingMipmapsActive: 0
103 | streamingMipmapsAddAllCameras: 1
104 | streamingMipmapsMemoryBudget: 512
105 | streamingMipmapsRenderersPerFrame: 512
106 | streamingMipmapsMaxLevelReduction: 2
107 | streamingMipmapsMaxFileIORequests: 1024
108 | particleRaycastBudget: 64
109 | asyncUploadTimeSlice: 2
110 | asyncUploadBufferSize: 16
111 | asyncUploadPersistentBuffer: 1
112 | resolutionScalingFixedDPIFactor: 1
113 | excludedTargetPlatforms: []
114 | - serializedVersion: 2
115 | name: High
116 | pixelLightCount: 2
117 | shadows: 2
118 | shadowResolution: 1
119 | shadowProjection: 1
120 | shadowCascades: 2
121 | shadowDistance: 40
122 | shadowNearPlaneOffset: 3
123 | shadowCascade2Split: 0.33333334
124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
125 | shadowmaskMode: 1
126 | blendWeights: 2
127 | textureQuality: 0
128 | anisotropicTextures: 1
129 | antiAliasing: 0
130 | softParticles: 0
131 | softVegetation: 1
132 | realtimeReflectionProbes: 1
133 | billboardsFaceCameraPosition: 1
134 | vSyncCount: 1
135 | lodBias: 1
136 | maximumLODLevel: 0
137 | streamingMipmapsActive: 0
138 | streamingMipmapsAddAllCameras: 1
139 | streamingMipmapsMemoryBudget: 512
140 | streamingMipmapsRenderersPerFrame: 512
141 | streamingMipmapsMaxLevelReduction: 2
142 | streamingMipmapsMaxFileIORequests: 1024
143 | particleRaycastBudget: 256
144 | asyncUploadTimeSlice: 2
145 | asyncUploadBufferSize: 16
146 | asyncUploadPersistentBuffer: 1
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Very High
151 | pixelLightCount: 3
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 2
156 | shadowDistance: 70
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 1.5
171 | maximumLODLevel: 0
172 | streamingMipmapsActive: 0
173 | streamingMipmapsAddAllCameras: 1
174 | streamingMipmapsMemoryBudget: 512
175 | streamingMipmapsRenderersPerFrame: 512
176 | streamingMipmapsMaxLevelReduction: 2
177 | streamingMipmapsMaxFileIORequests: 1024
178 | particleRaycastBudget: 1024
179 | asyncUploadTimeSlice: 2
180 | asyncUploadBufferSize: 16
181 | asyncUploadPersistentBuffer: 1
182 | resolutionScalingFixedDPIFactor: 1
183 | excludedTargetPlatforms: []
184 | - serializedVersion: 2
185 | name: Ultra
186 | pixelLightCount: 4
187 | shadows: 2
188 | shadowResolution: 2
189 | shadowProjection: 1
190 | shadowCascades: 4
191 | shadowDistance: 150
192 | shadowNearPlaneOffset: 3
193 | shadowCascade2Split: 0.33333334
194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
195 | shadowmaskMode: 1
196 | blendWeights: 4
197 | textureQuality: 0
198 | anisotropicTextures: 2
199 | antiAliasing: 2
200 | softParticles: 1
201 | softVegetation: 1
202 | realtimeReflectionProbes: 1
203 | billboardsFaceCameraPosition: 1
204 | vSyncCount: 1
205 | lodBias: 2
206 | maximumLODLevel: 0
207 | streamingMipmapsActive: 0
208 | streamingMipmapsAddAllCameras: 1
209 | streamingMipmapsMemoryBudget: 512
210 | streamingMipmapsRenderersPerFrame: 512
211 | streamingMipmapsMaxLevelReduction: 2
212 | streamingMipmapsMaxFileIORequests: 1024
213 | particleRaycastBudget: 4096
214 | asyncUploadTimeSlice: 2
215 | asyncUploadBufferSize: 16
216 | asyncUploadPersistentBuffer: 1
217 | resolutionScalingFixedDPIFactor: 1
218 | excludedTargetPlatforms: []
219 | m_PerPlatformDefaultQuality:
220 | Android: 2
221 | Lumin: 5
222 | Nintendo 3DS: 5
223 | Nintendo Switch: 5
224 | PS4: 5
225 | PSP2: 2
226 | Standalone: 5
227 | WebGL: 3
228 | Windows Store Apps: 5
229 | XboxOne: 5
230 | iPhone: 2
231 | tvOS: 2
232 |
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildAssetBundlesCommandBase.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildAssetBundlesCommandBase.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/20
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using System.IO;
12 | using System.Text;
13 | using UnityEditor;
14 | using UnityEngine;
15 | using UBuildPipeline = UnityEditor.BuildPipeline;
16 |
17 | namespace UnityCommandLine.BuildPipeline
18 | {
19 | ///
20 | ///
21 | /// The base class for all build-asset-bundles-related commands executable through Unity's command line interface.
22 | ///
23 | public class BuildAssetBundlesCommandBase : BuildPipelineCommandBase
24 | {
25 | #region Statics
26 |
27 | #region Static Methods
28 |
29 | ///
30 | /// Builds asset bundles.
31 | ///
32 | /// The build asset bundles settings.
33 | /// The asset bundle manifest.
34 | private static AssetBundleManifest BuildAssetBundles(BuildAssetBundlesSettings settings)
35 | {
36 | return UBuildPipeline.BuildAssetBundles(settings.OutputPath, settings.Options, settings.TargetPlatform);
37 | }
38 |
39 | ///
40 | /// Print a object.
41 | ///
42 | /// The asset bundles settings object.
43 | /// The title.
44 | private static void PrintSettings(BuildAssetBundlesSettings settings, string title = null)
45 | {
46 | var stringBuilder = new StringBuilder();
47 |
48 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
49 | if (!string.IsNullOrEmpty(title)) stringBuilder.AppendLine(title);
50 | BuildAssetBundlesSettings.Print(settings, stringBuilder);
51 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
52 |
53 | PrintLine(stringBuilder.ToString());
54 | }
55 |
56 | #endregion
57 |
58 | #endregion
59 |
60 | #region Fields
61 |
62 | ///
63 | /// The build asset bundles settings to use when building the asset bundles.
64 | ///
65 | protected readonly BuildAssetBundlesSettings Settings;
66 |
67 | #endregion
68 |
69 | #region Constructors & Destructors
70 |
71 | ///
72 | /// Creates an instance of .
73 | ///
74 | public BuildAssetBundlesCommandBase()
75 | {
76 | Settings = new BuildAssetBundlesSettings();
77 |
78 | // Gets the build target string.
79 | string buildTargetString;
80 | if (!GetArgumentValue(Values.ARG_BUILD_TARGET, out buildTargetString))
81 | throw new Exception(string.Format("Argument '{0}' is required.", Values.ARG_BUILD_TARGET));
82 |
83 | var buildTarget = buildTargetString.ToBuildTarget();
84 |
85 | // Sets the build target.
86 | Settings.TargetPlatform = buildTarget;
87 |
88 | var targetGroup = BuildTargetUtils.GetBuildTargetGroup(Settings.TargetPlatform);
89 |
90 | if (!IsBuildTargetSupported(targetGroup, Settings.TargetPlatform))
91 | throw new Exception(string.Format("Build target '{0}' is not supported on this editor.", Settings.TargetPlatform));
92 | }
93 |
94 | #endregion
95 |
96 | #region Methods
97 |
98 | ///
99 | public override void Run()
100 | {
101 | InitArgs();
102 |
103 | PrintSettings(Settings, "Building:");
104 |
105 | BuildAssetBundles(Settings);
106 | }
107 |
108 | ///
109 | /// Gets the output path.
110 | ///
111 | /// The output folder name.
112 | /// Returns the output path.
113 | protected virtual string GetOutputPath(string outputFolderName)
114 | {
115 | var directoryPath = CommandUtils.PathCombine(Path.GetDirectoryName(Application.dataPath), Values.DEFAULT_BUNDLE_FOLDER_NAME, outputFolderName);
116 |
117 | if (!Directory.Exists(directoryPath))
118 | Directory.CreateDirectory(directoryPath);
119 |
120 | return directoryPath;
121 | }
122 |
123 | ///
124 | /// Initializes the arguments used by this command.
125 | ///
126 | private void InitArgs()
127 | {
128 | string bundleName;
129 | if (!GetArgumentValue(Values.ARG_BUNDLE_NAME, out bundleName))
130 | bundleName = Values.DEFAULT_BUNDLE_NAME;
131 |
132 | // Set the asset bundle output path.
133 | Settings.OutputPath = GetOutputPath(bundleName);
134 |
135 | // Set the initial bundle option.
136 | Settings.Options = Values.DEFAULT_BUNDLE_OPTIONS;
137 |
138 | // Set additional bundle options to use in the build.
139 | if (HasArgument(Values.ARG_OPTION_UNCOMPRESSED_ASSET_BUNDLE))
140 | Settings.Options |= BuildAssetBundleOptions.UncompressedAssetBundle;
141 |
142 | if (HasArgument(Values.ARG_OPTION_DISABLE_WRITE_TYPE_TREE))
143 | Settings.Options |= BuildAssetBundleOptions.DisableWriteTypeTree;
144 |
145 | if (HasArgument(Values.ARG_OPTION_DETERMINISTIC_ASSET_BUNDLE))
146 | Settings.Options |= BuildAssetBundleOptions.DeterministicAssetBundle;
147 |
148 | if (HasArgument(Values.ARG_OPTION_FORCE_REBUILD_ASSET_BUNDLE))
149 | Settings.Options |= BuildAssetBundleOptions.ForceRebuildAssetBundle;
150 |
151 | if (HasArgument(Values.ARG_OPTION_IGNORE_TYPE_TREE_CHANGES))
152 | Settings.Options |= BuildAssetBundleOptions.IgnoreTypeTreeChanges;
153 |
154 | if (HasArgument(Values.ARG_OPTION_APPEND_HASH_TO_ASSET_BUNDLE_NAME))
155 | Settings.Options |= BuildAssetBundleOptions.AppendHashToAssetBundleName;
156 |
157 | #if UNITY_5_3_OR_NEWER
158 | if (HasArgument(Values.ARG_OPTION_CHUNK_BASED_COMPRESSION))
159 | Settings.Options |= BuildAssetBundleOptions.ChunkBasedCompression;
160 | #endif
161 |
162 | #if UNITY_5_4_OR_NEWER
163 | if (HasArgument(Values.ARG_OPTION_STRICT_MODE))
164 | Settings.Options |= BuildAssetBundleOptions.StrictMode;
165 | #endif
166 |
167 | #if UNITY_5_5_OR_NEWER
168 | if (HasArgument(Values.ARG_OPTION_DRY_RUN_BUILD))
169 | Settings.Options |= BuildAssetBundleOptions.DryRunBuild;
170 | #else // UNITY_5_4_OR_OLDER
171 | #if UNITY_5_4_OR_NEWER // UNITY_5_4_ONLY
172 | if (HasArgument(Values.ARG_OPTION_OMIT_CLASS_VERSIONS))
173 | Settings.Options |= BuildAssetBundleOptions.OmitClassVersions;
174 | #endif
175 | #endif
176 |
177 | #if UNITY_2017_1_OR_NEWER
178 | if (HasArgument(Values.ARG_OPTION_DISABLE_LOAD_ASSET_BY_FILE_NAME))
179 | Settings.Options |= BuildAssetBundleOptions.DisableLoadAssetByFileName;
180 |
181 | if (HasArgument(Values.ARG_OPTION_DISABLE_LOAD_ASSET_BY_FILE_NAME_WITH_EXTENSION))
182 | Settings.Options |= BuildAssetBundleOptions.DisableLoadAssetByFileNameWithExtension;
183 | #endif
184 | }
185 |
186 | #endregion
187 | }
188 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildPlayerSettings.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: Settings.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System.Text;
11 | using UnityEditor;
12 |
13 | namespace UnityCommandLine.BuildPipeline
14 | {
15 | ///
16 | /// A container class for all values used when building a player.
17 | ///
18 | public class BuildPlayerSettings
19 | {
20 | #region Statics
21 |
22 | #region Static Methods
23 |
24 | ///
25 | /// Applies the values of a instance to and .
26 | ///
27 | /// The build player settings instance.
28 | public static void Apply(BuildPlayerSettings settings)
29 | {
30 | var targetGroup = BuildTargetUtils.GetBuildTargetGroup(settings.Target);
31 |
32 | EditorUserBuildSettings.SwitchActiveBuildTarget(targetGroup, settings.Target);
33 | PlayerSettings.SetApplicationIdentifier(targetGroup, settings.ApplicationIdentifier);
34 | PlayerSettings.bundleVersion = settings.BundleVersion;
35 | EditorPrefs.SetString("AndroidSdkRoot", settings.AndroidSdkPath);
36 | PlayerSettings.Android.keyaliasName = settings.AndroidKeyAliasName;
37 | PlayerSettings.Android.keyaliasPass = settings.AndroidKeyAliasPass;
38 | PlayerSettings.Android.keystoreName = settings.AndroidKeyStoreName;
39 | PlayerSettings.Android.keystorePass = settings.AndroidKeyStorePass;
40 | }
41 |
42 | ///
43 | /// Creates an instance of with values from and .
44 | ///
45 | /// Returns a build player settings object.
46 | public static BuildPlayerSettings Create()
47 | {
48 | return new BuildPlayerSettings
49 | {
50 | Target = EditorUserBuildSettings.activeBuildTarget,
51 | ApplicationIdentifier = PlayerSettings.applicationIdentifier,
52 | BundleVersion = PlayerSettings.bundleVersion,
53 | AndroidSdkPath = EditorPrefs.GetString("AndroidSdkRoot"),
54 | AndroidKeyAliasName = PlayerSettings.Android.keyaliasName,
55 | AndroidKeyAliasPass = PlayerSettings.Android.keyaliasPass,
56 | AndroidKeyStoreName = PlayerSettings.Android.keystoreName,
57 | AndroidKeyStorePass = PlayerSettings.Android.keystorePass
58 | };
59 | }
60 |
61 | ///
62 | /// Prints the values of a instance.
63 | ///
64 | /// The build player settings instance.
65 | /// The string builder instance.
66 | public static void Print(BuildPlayerSettings settings, StringBuilder stringBuilder)
67 | {
68 | const string listItemPrefix = " - ";
69 |
70 | stringBuilder.AppendLine(string.Format("EditorUserBuildSettings.activeBuildTarget = {0} ({1})", settings.Target, settings.TargetGroup));
71 | stringBuilder.AppendLine(string.Format("PlayerSettings.applicationIdentifier = {0}", settings.ApplicationIdentifier));
72 | stringBuilder.AppendLine(string.Format("PlayerSettings.bundleVersion = {0}", settings.BundleVersion));
73 |
74 | if (!string.IsNullOrEmpty(settings.AndroidKeyAliasName) ||
75 | !string.IsNullOrEmpty(settings.AndroidKeyStoreName))
76 | {
77 | stringBuilder.AppendLine(string.Format("EditorPrefs.AndroidSdkRoot: {0}", settings.AndroidSdkPath));
78 | stringBuilder.AppendLine("PlayerSettings.Android:");
79 | stringBuilder.AppendLine(string.Format(" - KeyAliasName: {0}", settings.AndroidKeyAliasName));
80 | stringBuilder.AppendLine(string.Format(" - KeyAliasPass: {0}", settings.AndroidKeyAliasPass));
81 | stringBuilder.AppendLine(string.Format(" - KeyStoreName: {0}", settings.AndroidKeyStoreName));
82 | stringBuilder.AppendLine(string.Format(" - KeyStorePass: {0}", settings.AndroidKeyStorePass));
83 | }
84 |
85 | if (!string.IsNullOrEmpty(settings.OutputPath))
86 | stringBuilder.AppendLine(string.Format("OutputPath: {0}", settings.OutputPath));
87 |
88 | if (settings.Levels != null && settings.Levels.Length > 0)
89 | stringBuilder.AppendLine(string.Format("Levels:\n{0}{1}", listItemPrefix, string.Join(
90 | string.Format("\n{0}", listItemPrefix), settings.Levels)));
91 |
92 | if (settings.Options != BuildOptions.None)
93 | stringBuilder.AppendLine(string.Format("Options: {0}", settings.Options));
94 | }
95 |
96 | #endregion
97 |
98 | #endregion
99 |
100 | #region Properties
101 |
102 | ///
103 | /// Gets and sets the .
104 | ///
105 | public BuildTarget Target { get; set; }
106 |
107 | ///
108 | /// Gets and sets the .
109 | ///
110 | public string ApplicationIdentifier { get; set; }
111 |
112 | ///
113 | /// Gets and sets the
114 | ///
115 | public string BundleVersion { get; set; }
116 |
117 | ///
118 | /// Gets and sets the [AndroidSdkRoot].
119 | ///
120 | public string AndroidSdkPath { get; set; }
121 |
122 | ///
123 | /// Gets and sets the .
124 | ///
125 | public string AndroidKeyAliasName { get; set; }
126 |
127 | ///
128 | /// Gets and sets the .
129 | ///
130 | public string AndroidKeyAliasPass { get; set; }
131 |
132 | ///
133 | /// Gets and sets the .
134 | ///
135 | public string AndroidKeyStoreName { get; set; }
136 |
137 | ///
138 | /// Gets and sets the .
139 | ///
140 | public string AndroidKeyStorePass { get; set; }
141 |
142 | ///
143 | /// Gets best matching for the build target .
144 | ///
145 | public BuildTargetGroup TargetGroup
146 | {
147 | get { return BuildTargetUtils.GetBuildTargetGroup(Target); }
148 | }
149 |
150 | ///
151 | /// Gets and sets the output path.
152 | ///
153 | public string OutputPath { get; set; }
154 |
155 | ///
156 | /// Gets and sets the list of scenes to include in the build.
157 | ///
158 | public string[] Levels { get; set; }
159 |
160 | ///
161 | /// Gets and sets the build options to use when building the player.
162 | ///
163 | public BuildOptions Options { get; set; }
164 |
165 | #endregion
166 |
167 | #region Methods
168 |
169 | ///
170 | /// Applies the values of this instance to and .
171 | ///
172 | public void Apply()
173 | {
174 | Apply(this);
175 | }
176 |
177 | #endregion
178 | }
179 | }
--------------------------------------------------------------------------------
/docs/CODING_STANDARDS.md:
--------------------------------------------------------------------------------
1 | # Coding Standards
2 |
3 | * Braces go on a newline.
4 |
5 | * Use `4` spaces exclusively instead of tabs.
6 |
7 | * Use the `C#` `XML`-style summary comment.
8 |
9 | * Use `var` instead of declaring variable types. (more readable)
10 |
11 | ```csharp
12 | // Use
13 | var myVariable = new Dictionary();
14 |
15 | // Instead of
16 | Dictionary myVariable = new Dictionary();
17 | ```
18 |
19 | * Use the `public` access modifier for `enums` inside a class. (easier sharing of `enums` between types)
20 |
21 | ```csharp
22 | // Use
23 | var myEnum = MyEnum.Default;
24 |
25 | // Instead of
26 | var myEnum = MyOtherClass.MyEnum.Default;
27 | ```
28 |
29 | * Use `string.Format` or `StringBuilder` whenever possible.
30 |
31 | * Use `Mathf.Approximately` when comparing `float` variables to constant values.
32 |
33 | * Limit the inheritance depth to `3`. Prioritize composition over inheritance.
34 |
35 | * Limit the number of parameters in a method to `8`.
36 |
37 | * Limit the block nesting depth to `4`.
38 |
39 | ```csharp
40 | for (;;)
41 | { // 1
42 | for (;;)
43 | { // 2
44 | for (;;)
45 | { // 3
46 | if (condition)
47 | { // 4
48 | }
49 | else
50 | { // 4
51 | }
52 | }
53 | }
54 | }
55 | ```
56 |
57 | * Limit the number control flow branches in a single code block to `20`.
58 | These includes `if`, `else if`, `else`, `while`, `do-while`, `for`, `foreach`, each `case` in a `switch`, `try`, `catch`, and `finally`.
59 | Also included are the AND (`&&`), OR (`||`), Conditional (`?:`), Null-Propagation (`??`), and Null-Conditional (`?.` or `?[]`) operators.
60 |
61 | ```csharp
62 | // Method 'DestroyIfTaggedWith' has cyclomatic complexity of 4 (20% of threshold)
63 | private void DestroyIfTaggedWith(string tag, GameObject gameObject)
64 | {
65 | if (string.IsNullOrWhiteSpace(tag)) // 1
66 | throw new ArgumentNullException(nameof(tag));
67 |
68 | if (gameObject == null) // 2
69 | throw new ArgumentNullException(nameof(gameObject));
70 |
71 | if (tag.Equals(gameObject.tag)) // 3
72 | Object.Destroy(gameObject);
73 |
74 | // +1 Always
75 | }
76 | ```
77 |
78 | * Treat `compiler warnings` as `errors`. There should be `zero warnings` at build or runtime in normal operation.
79 |
80 | * All `using` declarations go together at the top of the file.
81 |
82 | * All `using` aliases should be placed at the bottom of all the other `using` declarations.
83 |
84 | * All `public` `classes`, `interfaces`, `structs`, `enums`, and `members` should be documented using `XML`-style `summary` comments.
85 |
86 | * All `private` and `protected` members' `XML`-style comments are **optional**, but **all** `public` members must have a `XML`-style `summary` comment.
87 |
88 | * All `Parameter` and `Return` descriptions are **optional**, add them if you feel they need a non-trivial explanation.
89 |
90 | * All `SerializeField` fields should **never** be public. Use a `public` accessor property to access the field if external access is required.
91 |
92 | * All `SerializeField` fields should **always** have a `Tooltip` attribute. This doubles as code documentation for the field.
93 |
94 | ```csharp
95 | [SerializeField] [Tooltip("Tooltip comment displayed in the editor.")]
96 | private float _myFloat;
97 | ...
98 | ///
99 | /// MyFloat is a property that exposes
100 | /// the value of the _myFloat field to other types.
101 | ///
102 | public float MyFloat
103 | {
104 | get { return _myFloat; }
105 | }
106 | ```
107 |
108 | * When creating an Editor GUI use `GUIContent` to add tooltips on UI elements instead of plain text. This doubles as code documentation for the UI element.
109 |
110 | ```csharp
111 | // Use
112 | if (GUILayout.Button("Recenter"))
113 | {
114 | ...
115 | }
116 |
117 | // Instead of
118 | if (GUILayout.Button(new GUIContent("Recenter", "Moves the selected object into the World Coordinates. (0, 0, 0)."))
119 | {
120 | ...
121 | }
122 | ```
123 |
124 | ## File Layout
125 |
126 | ```csharp
127 | using MyOtherNamespace;
128 | using Foobar = MyOtherOtherNamespace;
129 |
130 | namespace MyNameSpace
131 | {
132 | public class MyClass : MonoBehaviour, //
133 | IMyInterface
134 | where TParam0 : MyOtherClass
135 | where TParam1 : IMyOtherInterface
136 | {
137 | #region Nested Types
138 | ..enum // if public or protected access
139 | ..delegate // if public or protected access
140 | ..structs // if public or protected access
141 | ..classes // if public or protected access
142 | ..other types // if public or protected access
143 |
144 | #region Constants
145 | ..public //
146 | ..protected //
147 | ..private
148 |
149 | #region Statics
150 | #region Fields
151 | ..public //
152 | ..protected //
153 | ..private
154 | #region Properties
155 | ..public //
156 | ..protected //
157 | ..private
158 | #region Methods
159 | ..public //
160 | ..protected //
161 | ..private
162 |
163 | #region Operators
164 |
165 | #region Fields
166 | ..private (SerializeFieldAttribute & TooltipAttribute) // private access only, make sure to also use TooltipAttribute
167 | ..private (InjectAttribute) // private access only
168 | ..public // do not use
169 | ..protected //
170 | ..private
171 |
172 | #region Constructors & Destructors
173 |
174 | #region Indexers & Events
175 |
176 | #region Properties
177 | ..interface // if public or protected access
178 | ..public //
179 | ..protected //
180 | ..private
181 | ..internal
182 |
183 | #region Methods
184 | ..interface // if public or protected access
185 | ..public //
186 | ..protected //
187 | ..private
188 | ..internal
189 | }
190 | }
191 | ```
192 |
193 | ## Naming Style
194 |
195 | ```csharp
196 | // Types and Namespaces
197 | public class Foobar { ... }
198 |
199 | // Interfaces
200 | public interace IFoobar { ... }
201 |
202 | // Type Parameters
203 | public class Foobar { ... }
204 |
205 | // Enums
206 | enum MyEnum
207 | {
208 | Fee,
209 | Fi,
210 | Fo,
211 | Fum
212 | }
213 |
214 | // Constants
215 | public const float PI_VALUE = 3.1415926f;
216 | private const string PASSPHRASE = "Hello World!";
217 |
218 | // Static Fields
219 | private static int _fee;
220 | private static readonly int Fi;
221 | protected static int Fo;
222 | public static int Fum;
223 |
224 | // Fields
225 | private string _quux;
226 | protected string Quuz;
227 | public string Corge;
228 |
229 | // Events, Properties, Methods
230 | public event Bar;
231 | protected int Foo { get; set; }
232 | private void Baz() { ... }
233 |
234 | // Parameters
235 | private void Baz(int qux) { ... }
236 |
237 | // Local Variables
238 | int quux;
239 |
240 | // All Other Entities
241 | // UpperCamelCase
242 | ```
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/Values.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: Values.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using UnityEditor;
11 |
12 | namespace UnityCommandLine.BuildPipeline
13 | {
14 | ///
15 | /// A container class for frequently used values in build-player-related commands.
16 | ///
17 | public static class Values
18 | {
19 | #region Constants
20 |
21 | ///
22 | /// The default indent string.
23 | ///
24 | public const string DEFAULT_INDENT = " ";
25 |
26 | ///
27 | /// The default build folder name.
28 | ///
29 | public const string DEFAULT_BUILD_FOLDER_NAME = "Builds";
30 |
31 | ///
32 | /// The default asset bundles folder name.
33 | ///
34 | public const string DEFAULT_BUNDLE_FOLDER_NAME = "AssetBundles";
35 |
36 | ///
37 | /// The default build file name.
38 | ///
39 | public const string DEFAULT_BUILD_NAME = "build";
40 |
41 | ///
42 | /// The default asset bundle folder name.
43 | ///
44 | public const string DEFAULT_BUNDLE_NAME = "bundle";
45 |
46 | ///
47 | /// The default build options.
48 | ///
49 | public const BuildOptions DEFAULT_BUILD_OPTIONS = BuildOptions.None;
50 |
51 | ///
52 | /// The default bundle options.
53 | ///
54 | public const BuildAssetBundleOptions DEFAULT_BUNDLE_OPTIONS = BuildAssetBundleOptions.None;
55 |
56 | ///
57 | /// The default value of print report verbose.
58 | ///
59 | public const bool DEFAULT_BUILD_REPORT_VERBOSE = false;
60 |
61 | ///
62 | /// The argument key for the build target.
63 | ///
64 | public const string ARG_BUILD_TARGET = "-buildTarget";
65 |
66 | ///
67 | /// The argument key for the build file name.
68 | ///
69 | public const string ARG_BUILD_NAME = "-buildName";
70 |
71 | ///
72 | /// The argument key for .
73 | ///
74 | public const string ARG_APPLICATION_IDENTIFIER = "-applicationIdentifier";
75 |
76 | ///
77 | /// The argument key for .
78 | ///
79 | public const string ARG_BUNDLE_VERSION = "-bundleVersion";
80 |
81 | ///
82 | /// The argument key for [AndroidSdkRoot].
83 | ///
84 | public const string ARG_ANDROID_SDK_PATH = "-androidSdkPath";
85 |
86 | ///
87 | /// The argument key for .
88 | ///
89 | public const string ARG_ANDROID_KEY_ALIAS_NAME = "-androidKeyAliasName";
90 |
91 | ///
92 | /// The argument key for .
93 | ///
94 | public const string ARG_ANDROID_KEY_ALIAS_PASS = "-androidKeyAliasPass";
95 |
96 | ///
97 | /// The argument key for .
98 | ///
99 | public const string ARG_ANDROID_KEY_STORE_NAME = "-androidKeyStoreName";
100 |
101 | ///
102 | /// The argument key for .
103 | ///
104 | public const string ARG_ANDROID_KEY_STORE_PASS = "-androidKeyStorePass";
105 |
106 | ///
107 | /// The argument switch for .
108 | ///
109 | public const string ARG_OPTION_DEVELOPMENT = "-optionDevelopment";
110 |
111 | ///
112 | /// The argument switch for .
113 | ///
114 | public const string ARG_OPTION_ALLOW_DEBUGGING = "-optionAllowDebugging";
115 |
116 | ///
117 | /// The argument switch for .
118 | ///
119 | public const string ARG_OPTION_SYMLINK_LIBRARIES = "-optionSymlinkLibraries";
120 |
121 | ///
122 | /// The argument switch for .
123 | ///
124 | public const string ARG_OPTION_FORCE_ENABLE_ASSERTIONS = "-optionForceEnableAssertions";
125 |
126 | ///
127 | /// The argument switch for .
128 | ///
129 | public const string ARG_OPTION_COMPRESS_WITH_LZ4 = "-optionCompressWithLz4";
130 |
131 | ///
132 | /// The argument switch for .
133 | ///
134 | public const string ARG_OPTION_COMPRESS_WITH_LZ4_HC = "-optionCompressWithLz4HC";
135 |
136 | ///
137 | /// The argument switch for or .
138 | ///
139 | public const string ARG_OPTION_STRICT_MODE = "-optionStrictMode";
140 |
141 | ///
142 | /// The argument switch for .
143 | ///
144 | public const string ARG_OPTION_INCLUDE_TEST_ASSEMBLIES = "-optionIncludeTestAssemblies";
145 |
146 | ///
147 | /// The argument key for the bundle folder name.
148 | ///
149 | public const string ARG_BUNDLE_NAME = "-bundleName";
150 |
151 | ///
152 | /// The argument switch for .
153 | ///
154 | public const string ARG_OPTION_UNCOMPRESSED_ASSET_BUNDLE = "-optionUncompressedAssetBundle";
155 |
156 | ///
157 | /// The argument switch for .
158 | ///
159 | public const string ARG_OPTION_DISABLE_WRITE_TYPE_TREE = "-optionDisableWriteTypeTree";
160 |
161 | ///
162 | /// The argument switch for .
163 | ///
164 | public const string ARG_OPTION_DETERMINISTIC_ASSET_BUNDLE = "-optionDeterministicAssetBundle";
165 |
166 | ///
167 | /// The argument switch for .
168 | ///
169 | public const string ARG_OPTION_FORCE_REBUILD_ASSET_BUNDLE = "-optionForceRebuildAssetBundle";
170 |
171 | ///
172 | /// The argument switch for .
173 | ///
174 | public const string ARG_OPTION_IGNORE_TYPE_TREE_CHANGES = "-optionIgnoreTypeTreeChanges";
175 |
176 | ///
177 | /// The argument switch for .
178 | ///
179 | public const string ARG_OPTION_APPEND_HASH_TO_ASSET_BUNDLE_NAME = "-optionAppendHashToAssetBundleName";
180 |
181 | ///
182 | /// The argument switch for .
183 | ///
184 | public const string ARG_OPTION_CHUNK_BASED_COMPRESSION = "-optionChunkBasedCompression";
185 |
186 | ///
187 | /// The argument switch for .
188 | ///
189 | public const string ARG_OPTION_OMIT_CLASS_VERSIONS = "-optionOmitClassVersions";
190 |
191 | ///
192 | /// The argument switch for .
193 | ///
194 | public const string ARG_OPTION_DRY_RUN_BUILD = "-optionDryRunBuild";
195 |
196 | ///
197 | /// The argument switch for .
198 | ///
199 | public const string ARG_OPTION_DISABLE_LOAD_ASSET_BY_FILE_NAME = "-optionDisableLoadAssetByFileName";
200 |
201 | ///
202 | /// The argument switch for .
203 | ///
204 | public const string ARG_OPTION_DISABLE_LOAD_ASSET_BY_FILE_NAME_WITH_EXTENSION = "-optionDisableLoadAssetByFileNameWithExtension d";
205 |
206 | #endregion
207 | }
208 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildTargetUtils.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildTargetUtils.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using UnityEditor;
12 |
13 | // ReSharper disable CyclomaticComplexity
14 |
15 | namespace UnityCommandLine.BuildPipeline
16 | {
17 | ///
18 | /// A utility class container for -related methods.
19 | ///
20 | public static class BuildTargetUtils
21 | {
22 | #region Statics
23 |
24 | #region Static Methods
25 |
26 | ///
27 | /// Converts a string into a .
28 | ///
29 | /// The string.
30 | /// The default value.
31 | /// Returns the build target.
32 | public static BuildTarget ConvertStringToBuildTarget(string str, BuildTarget defaultValue = BuildTarget.NoTarget)
33 | {
34 | if (Enum.IsDefined(typeof(BuildTarget), str))
35 | return (BuildTarget) Enum.Parse(typeof(BuildTarget), str, true);
36 |
37 | var strLower = str.ToLower();
38 |
39 | switch (strLower)
40 | {
41 | case "win":
42 | return BuildTarget.StandaloneWindows;
43 |
44 | case "linux":
45 | return BuildTarget.StandaloneLinux;
46 |
47 | case "win64":
48 | return BuildTarget.StandaloneWindows64;
49 |
50 | case "windowsstoreapps":
51 | return BuildTarget.WSAPlayer;
52 |
53 | case "linux64":
54 | return BuildTarget.StandaloneLinux64;
55 |
56 | case "linuxuniversal":
57 | return BuildTarget.StandaloneLinuxUniversal;
58 |
59 | #if UNITY_2017_3_OR_NEWER
60 | case "osxuniversal":
61 | return BuildTarget.StandaloneOSX;
62 |
63 | #else // UNITY_2017_2_OR_OLDER
64 | case "osxuniversal":
65 | return BuildTarget.StandaloneOSXUniversal;
66 |
67 | case "osxintel":
68 | return BuildTarget.StandaloneOSXIntel;
69 |
70 | case "osxintel64":
71 | return BuildTarget.StandaloneOSXIntel64;
72 | #endif
73 |
74 |
75 | #if UNITY_5_4_OR_NEWER
76 | #else // UNITY_5_3_OR_OLDER
77 | case "web":
78 | return BuildTarget.WebPlayer;
79 | case "webstreamed:
80 | return BuildTarget.WebPlayerStreamed;
81 | #endif
82 |
83 | default:
84 | return defaultValue;
85 | }
86 | }
87 |
88 | ///
89 | /// Converts a string into a .
90 | ///
91 | /// The string.
92 | /// The default value.
93 | /// Returns the build target.
94 | public static BuildTarget ToBuildTarget(this string str, BuildTarget defaultValue = BuildTarget.NoTarget)
95 | {
96 | return ConvertStringToBuildTarget(str, defaultValue);
97 | }
98 |
99 | ///
100 | /// Gets the best matching file extensions for the given .
101 | ///
102 | /// The build target.
103 | /// The best matching file extension for the given build target.
104 | public static string GetFileExtension(BuildTarget target)
105 | {
106 | switch (target)
107 | {
108 | case BuildTarget.StandaloneWindows:
109 | return ".exe";
110 |
111 | case BuildTarget.iOS:
112 | return ".ipa";
113 |
114 | case BuildTarget.Android:
115 | return ".apk";
116 |
117 | case BuildTarget.StandaloneLinux:
118 | return ".x86";
119 |
120 | case BuildTarget.StandaloneWindows64:
121 | return ".exe";
122 |
123 | case BuildTarget.WebGL:
124 | return ".html";
125 |
126 | case BuildTarget.StandaloneLinux64:
127 | return ".x64";
128 |
129 | case BuildTarget.StandaloneLinuxUniversal:
130 | return ".x86_64";
131 |
132 | #if UNITY_2017_3_OR_NEWER
133 | case BuildTarget.StandaloneOSX:
134 | return ".app";
135 |
136 | #else // UNITY_2017_2_OR_OLDER
137 | case BuildTarget.StandaloneOSXUniversal:
138 | case BuildTarget.StandaloneOSXIntel:
139 | case BuildTarget.StandaloneOSXIntel64:
140 | return ".app";
141 | #endif
142 |
143 | #if UNITY_5_4_OR_NEWER
144 | #else // UNITY_5_3_OR_OLDER
145 | case BuildTarget.WebPlayer:
146 | case BuildTarget.WebPlayerStreamed:
147 | return ".html";
148 | #endif
149 |
150 | default:
151 | return null;
152 | }
153 | }
154 |
155 | ///
156 | /// Gets the best matching for the given .
157 | ///
158 | /// The build target.
159 | /// The best matching build target group for the given build target.
160 | public static BuildTargetGroup GetBuildTargetGroup(BuildTarget target)
161 | {
162 | switch (target)
163 | {
164 | case BuildTarget.StandaloneWindows:
165 | return BuildTargetGroup.Standalone;
166 |
167 | case BuildTarget.iOS:
168 | return BuildTargetGroup.iOS;
169 |
170 | case BuildTarget.Android:
171 | return BuildTargetGroup.Android;
172 |
173 | case BuildTarget.StandaloneLinux:
174 | case BuildTarget.StandaloneWindows64:
175 | return BuildTargetGroup.Standalone;
176 |
177 | case BuildTarget.WebGL:
178 | return BuildTargetGroup.WebGL;
179 |
180 | case BuildTarget.WSAPlayer:
181 | return BuildTargetGroup.WSA;
182 |
183 | case BuildTarget.StandaloneLinux64:
184 | case BuildTarget.StandaloneLinuxUniversal:
185 | return BuildTargetGroup.Standalone;
186 |
187 | case BuildTarget.PS4:
188 | return BuildTargetGroup.PS4;
189 |
190 | case BuildTarget.XboxOne:
191 | return BuildTargetGroup.XboxOne;
192 |
193 | case BuildTarget.tvOS:
194 | return BuildTargetGroup.tvOS;
195 |
196 | #if UNITY_2018_3_OR_NEWER
197 | #else // UNITY_2018_2_OR_OLDER
198 | case BuildTarget.PSP2:
199 | return BuildTargetGroup.PSP2; // 5.0 ~ 2018.2
200 |
201 | case BuildTarget.WiiU:
202 | return BuildTargetGroup.WiiU; // 5.2 ~ 2018.2
203 |
204 | #if UNITY_5_5_OR_NEWER
205 | case BuildTarget.N3DS:
206 | return BuildTargetGroup.N3DS; // 5.5 ~ 2018.2
207 | #endif
208 | #endif
209 |
210 | #if UNITY_2018_2_OR_NEWER
211 | #else // UNITY_2018_1_OR_OLDER
212 | case BuildTarget.Tizen:
213 | return BuildTargetGroup.Tizen; // 5.1 ~ 2018.1
214 | #endif
215 |
216 | #if UNITY_2017_3_OR_NEWER
217 | case BuildTarget.StandaloneOSX:
218 | return BuildTargetGroup.Standalone;
219 |
220 | #else // UNITY_2017_2_OR_OLDER
221 | case BuildTarget.StandaloneOSXUniversal:
222 | case BuildTarget.StandaloneOSXIntel:
223 | case BuildTarget.StandaloneOSXIntel64:
224 | return BuildTargetGroup.Standalone; // 5.0 ~ 2017.2
225 |
226 | case BuildTarget.SamsungTV:
227 | return BuildTargetGroup.SamsungTV; // 5.0 ~ 2017.2
228 | #endif
229 |
230 | #if UNITY_5_6_OR_NEWER
231 | case BuildTarget.Switch:
232 | return BuildTargetGroup.Switch;
233 | #else
234 | #endif
235 |
236 | #if UNITY_5_5_OR_NEWER
237 | #else // UNITY_5_4_OR_OLDER
238 | case BuildTarget.PS3:
239 | return BuildTargetGroup.PS3; // 5.0 ~ 5.4
240 |
241 | case BuildTarget.XBOX360:
242 | return BuildTargetGroup.XBOX360; // 5.0 ~ 5.4
243 |
244 | case BuildTarget.Nintendo3DS:
245 | return BuildTargetGroup.Nintendo3DS; // 5.0 ~ 5.4
246 | #endif
247 |
248 | #if UNITY_5_4_OR_NEWER
249 | #else // UNITY_5_3_OR_OLDER
250 | case BuildTarget.WebPlayer:
251 | case BuildTarget.WebPlayerStreamed:
252 | return BuildTargetGroup.WebPlayer; // 5.3 ~ 5.3
253 | #endif
254 |
255 | default:
256 | return BuildTargetGroup.Unknown;
257 | }
258 | }
259 |
260 | #endregion
261 |
262 | #endregion
263 | }
264 | }
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildReportUtils.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildReportUtils.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | #if UNITY_2018_1_OR_NEWER
11 |
12 | using System.IO;
13 | using System.Linq;
14 | using System.Text;
15 | using UnityEditor.Build.Reporting;
16 |
17 | namespace UnityCommandLine.BuildPipeline
18 | {
19 | ///
20 | /// A utility class container for -related methods.
21 | ///
22 | public static class BuildReportUtils
23 | {
24 | #region Statics
25 |
26 | #region Static Methods
27 |
28 | ///
29 | /// Stringifies a instance.
30 | ///
31 | /// The build report.
32 | /// The string builder instance.
33 | /// Whether or not the output is verbose.
34 | public static void StringifyReport(BuildReport report, StringBuilder stringBuilder,
35 | bool verbose = false)
36 | {
37 | stringBuilder.AppendLine("Build Report:");
38 | StringifySummary(report.summary, stringBuilder);
39 | StringifyStrippingInfo(report.strippingInfo, stringBuilder);
40 | StringifySteps(report.steps, stringBuilder, verbose);
41 | StringifyFiles(report.files, stringBuilder, verbose);
42 | }
43 |
44 | ///
45 | /// Stringifies a instance.
46 | ///
47 | /// The build summary.
48 | /// The string builder instance.
49 | /// The indent level.
50 | /// The indent string.
51 | private static void StringifySummary(BuildSummary summary, StringBuilder stringBuilder,
52 | int indentLevel = 0, string indent = Values.DEFAULT_INDENT)
53 | {
54 | var ind = CreateIndent(indentLevel, indent);
55 |
56 | stringBuilder.AppendLine($"{ind}- Summary:");
57 | stringBuilder.AppendLine($"{ind} - Result: {summary.result}");
58 | stringBuilder.AppendLine($"{ind} - GUID: {summary.guid}");
59 | stringBuilder.AppendLine($"{ind} - Platform: {summary.platform}");
60 | stringBuilder.AppendLine($"{ind} - PlatformGroup: {summary.platformGroup}");
61 | stringBuilder.AppendLine($"{ind} - OutputPath: {summary.outputPath}");
62 | stringBuilder.AppendLine($"{ind} - Options: {summary.options}");
63 | stringBuilder.AppendLine($"{ind} - StartedAt: {summary.buildStartedAt:s}");
64 | stringBuilder.AppendLine($"{ind} - EndedAt: {summary.buildEndedAt:s}");
65 | stringBuilder.AppendLine($"{ind} - TotalWarnings: {summary.totalWarnings}");
66 | stringBuilder.AppendLine($"{ind} - TotalErrors: {summary.totalErrors}");
67 | stringBuilder.AppendLine($"{ind} - TotalSize: {summary.totalSize / 1000} KB");
68 | stringBuilder.AppendLine($"{ind} - TotalTime: {(int) summary.totalTime.TotalMilliseconds} ms");
69 | }
70 |
71 | ///
72 | /// Stringifies a instance.
73 | ///
74 | /// The stripping info.
75 | /// The string builder instance.
76 | /// The indent level.
77 | /// The indent string.
78 | private static void StringifyStrippingInfo(StrippingInfo strippingInfo, StringBuilder stringBuilder,
79 | int indentLevel = 0, string indent = Values.DEFAULT_INDENT)
80 | {
81 | var ind = CreateIndent(indentLevel, indent);
82 |
83 | if (strippingInfo == null)
84 | return;
85 |
86 | stringBuilder.AppendLine($"{ind}- Stripping Info:");
87 |
88 | foreach (var includedModule in strippingInfo.includedModules)
89 | stringBuilder.AppendLine($"{ind} - {includedModule}");
90 | }
91 |
92 | ///
93 | /// Stringifies instances.
94 | ///
95 | /// The build step instances.
96 | /// The string builder instance.
97 | /// Whether or not the output is verbose.
98 | /// The indent level.
99 | /// The indent string.
100 | private static void StringifySteps(BuildStep[] steps, StringBuilder stringBuilder,
101 | bool verbose = false,
102 | int indentLevel = 0, string indent = Values.DEFAULT_INDENT)
103 | {
104 | if (steps == null || steps.Length == 0)
105 | return;
106 |
107 | var ind = CreateIndent(indentLevel, indent);
108 |
109 | var duration = steps.Sum(step => step.duration.TotalMilliseconds);
110 |
111 | stringBuilder.AppendLine($"{ind}- Steps ({steps.Length} steps | {(int) duration} ms):");
112 |
113 | foreach (var step in steps)
114 | StringifyStep(step, stringBuilder, verbose, indentLevel + 1);
115 | }
116 |
117 | ///
118 | /// Stringifies a instance.
119 | ///
120 | /// The build step instance.
121 | /// The string builder instance.
122 | /// Whether or not the output is verbose.
123 | /// The indent level.
124 | /// The indent string.
125 | private static void StringifyStep(BuildStep step, StringBuilder stringBuilder,
126 | bool verbose = false,
127 | int indentLevel = 0, string indent = Values.DEFAULT_INDENT)
128 | {
129 | var ind = CreateIndent(indentLevel, indent);
130 |
131 | if (verbose)
132 | {
133 | stringBuilder.AppendLine($"{ind}- {step.name}");
134 | stringBuilder.AppendLine($"{ind} - Depth: {step.depth}");
135 | stringBuilder.AppendLine($"{ind} - Duration: {(int) step.duration.TotalMilliseconds} ms");
136 | }
137 | else
138 | {
139 | stringBuilder.AppendLine($"{ind}- {step.name} ({step.depth} depth | {(int) step.duration.TotalMilliseconds} ms)");
140 | }
141 |
142 | if (step.messages == null || step.messages.Length <= 0)
143 | return;
144 |
145 | stringBuilder.AppendLine($"{ind} - Messages: {step.messages.Length}");
146 |
147 | foreach (var message in step.messages)
148 | stringBuilder.AppendLine($"{ind} - {message.content}");
149 | }
150 |
151 | ///
152 | /// Stringifies instances.
153 | ///
154 | /// The build file instances.
155 | /// The string builder.
156 | /// Whether or not the output is verbose.
157 | /// The indent level.
158 | /// The indent string.
159 | private static void StringifyFiles(BuildFile[] files, StringBuilder stringBuilder,
160 | bool verbose = false,
161 | int indentLevel = 0, string indent = Values.DEFAULT_INDENT)
162 | {
163 | if (files == null || files.Length == 0)
164 | return;
165 |
166 | var ind = CreateIndent(indentLevel, indent);
167 |
168 | var size = files.Sum(file => (double) file.size);
169 |
170 | stringBuilder.AppendLine($"{ind}- Files ({files.Length} files | {(int) size / 1000} KB):");
171 |
172 | foreach (var file in files)
173 | StringifyFile(file, stringBuilder, verbose, indentLevel + 1);
174 | }
175 |
176 | ///
177 | /// Stringifies a instance.
178 | ///
179 | /// The build file instance.
180 | /// The string builder.
181 | /// Whether or not the output is verbose.
182 | /// The indent level.
183 | /// The indent string.
184 | private static void StringifyFile(BuildFile file, StringBuilder stringBuilder,
185 | bool verbose = false,
186 | int indentLevel = 0, string indent = Values.DEFAULT_INDENT)
187 | {
188 | var ind = CreateIndent(indentLevel, indent);
189 |
190 | if (verbose)
191 | {
192 | stringBuilder.AppendLine($"{ind}- {file.path}");
193 | stringBuilder.AppendLine($"{ind} - Role: {file.role}");
194 | stringBuilder.AppendLine($"{ind} - Size: {file.size / 1000} KB");
195 | }
196 | else
197 | {
198 | stringBuilder.AppendLine($"{ind}- {Path.GetFileName(file.path)} ({file.role} | {file.size / 1000} KB)");
199 | }
200 | }
201 |
202 | ///
203 | /// Creates an indent string.
204 | ///
205 | /// The indent level.
206 | /// The indent string.
207 | /// The new indent string.
208 | private static string CreateIndent(int indentLevel, string indent)
209 | {
210 | var ind = string.Empty;
211 |
212 | for (var i = 0; i < indentLevel; i++)
213 | ind += indent;
214 |
215 | return ind;
216 | }
217 |
218 | #endregion
219 |
220 | #endregion
221 | }
222 | }
223 |
224 | #endif
--------------------------------------------------------------------------------
/src/Assets/UnityCommandLine/Editor/BuildPipeline/BuildPlayerCommandBase.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 |
3 | // Filename: BuildPlayerCommandBase.cs
4 | // Author: Elmer Nocon
5 | // Date Created: 2019/05/16
6 | // License: MIT
7 |
8 | #endregion
9 |
10 | using System;
11 | using System.Linq;
12 | using System.Text;
13 | using UnityEditor;
14 | using UBuildPipeline = UnityEditor.BuildPipeline;
15 |
16 | #if UNITY_2018_1_OR_NEWER
17 | using UnityEditor.Build.Reporting;
18 | #endif
19 |
20 | namespace UnityCommandLine.BuildPipeline
21 | {
22 | ///
23 | ///
24 | /// The base class for all build-player-related commands executable through Unity's command line interface.
25 | ///
26 | public abstract class BuildPlayerCommandBase : BuildPipelineCommandBase
27 | {
28 | #region Statics
29 |
30 | #region Static Methods
31 |
32 | ///
33 | /// Builds a player.
34 | ///
35 | /// The build player settings.
36 | /// Either a BuildReport object or a string depending on the editor version used.
37 | private static
38 | #if UNITY_2018_1_OR_NEWER
39 | BuildReport
40 | #else
41 | string
42 | #endif
43 | BuildPlayer(BuildPlayerSettings settings)
44 | {
45 | return UBuildPipeline.BuildPlayer(settings.Levels, settings.OutputPath, settings.Target, settings.Options);
46 | }
47 |
48 | ///
49 | /// Gets all the included and enabled scenes in the project.
50 | ///
51 | /// The enabled scenes path.
52 | private static string[] GetEnabledScenes()
53 | {
54 | return EditorBuildSettings.scenes
55 | .Where(scene => scene.enabled && !string.IsNullOrEmpty(scene.path))
56 | .Select(scene => scene.path)
57 | .ToArray();
58 | }
59 |
60 | ///
61 | /// Prints a build report.
62 | ///
63 | /// The build report.
64 | #if UNITY_2018_1_OR_NEWER
65 | private static void PrintReport(BuildReport report)
66 | {
67 | var stringBuilder = new StringBuilder();
68 |
69 | stringBuilder.AppendLine();
70 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
71 | BuildReportUtils.StringifyReport(report, stringBuilder, Values.DEFAULT_BUILD_REPORT_VERBOSE);
72 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
73 |
74 | PrintLine(stringBuilder.ToString());
75 | }
76 | #else
77 | private static void PrintReport(string report)
78 | {
79 | PrintLine(report);
80 | }
81 | #endif
82 |
83 | ///
84 | /// Print a object.
85 | ///
86 | /// The build player settings object.
87 | /// The title.
88 | private static void PrintSettings(BuildPlayerSettings settings, string title = null)
89 | {
90 | var stringBuilder = new StringBuilder();
91 |
92 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
93 | if (!string.IsNullOrEmpty(title)) stringBuilder.AppendLine(title);
94 | BuildPlayerSettings.Print(settings, stringBuilder);
95 | stringBuilder.AppendLine(UnityCommandLine.Values.SEPARATOR);
96 |
97 | PrintLine(stringBuilder.ToString());
98 | }
99 |
100 | #endregion
101 |
102 | #endregion
103 |
104 | #region Fields
105 |
106 | ///
107 | /// The build player settings to use when building the player.
108 | ///
109 | protected readonly BuildPlayerSettings Settings;
110 |
111 | private readonly BuildPlayerSettings _backupSettings;
112 |
113 | #endregion
114 |
115 | #region Constructors & Destructors
116 |
117 | ///
118 | ///
119 | /// Creates an instance of .
120 | ///
121 | /// The build target.
122 | protected BuildPlayerCommandBase(BuildTarget target)
123 | {
124 | _backupSettings = BuildPlayerSettings.Create();
125 | Settings = BuildPlayerSettings.Create();
126 |
127 | Settings.Target = target;
128 |
129 | if (!IsBuildTargetSupported(Settings.TargetGroup, Settings.Target))
130 | throw new Exception(string.Format("Build target '{0}' is not supported on this editor.", target));
131 | }
132 |
133 | #endregion
134 |
135 | #region Methods
136 |
137 | ///
138 | public override void Run()
139 | {
140 | try
141 | {
142 | PrintSettings(_backupSettings, "Saved settings:");
143 |
144 | InitArgs();
145 |
146 | if (IsBuildPipelineBusy())
147 | throw new Exception("BuildPipeline is busy.");
148 |
149 | var report = BuildPlayer(Settings);
150 |
151 | PrintReport(report);
152 |
153 | #if UNITY_2018_1_OR_NEWER
154 | if (report.summary.result != BuildResult.Succeeded)
155 | throw new Exception("Build failed!");
156 | #endif
157 | }
158 | finally
159 | {
160 | _backupSettings.Apply();
161 |
162 | PrintSettings(_backupSettings, "Reverted settings:");
163 | }
164 | }
165 |
166 | ///
167 | /// Gets the output path.
168 | ///
169 | /// The output file name.
170 | /// Returns the output path.
171 | protected virtual string GetOutputPath(string outputFileName)
172 | {
173 | var fileExtension = BuildTargetUtils.GetFileExtension(Settings.Target);
174 |
175 | return CommandUtils.PathCombine(Values.DEFAULT_BUILD_FOLDER_NAME, Settings.Target.ToString(),
176 | string.Format("{0}{1}", outputFileName, fileExtension));
177 | }
178 |
179 | ///
180 | /// Initializes the arguments used by this command.
181 | ///
182 | private void InitArgs()
183 | {
184 | // Set the build name if there is one.
185 | string buildName;
186 | if (!GetArgumentValue(Values.ARG_BUILD_NAME, out buildName))
187 | buildName = Values.DEFAULT_BUILD_NAME;
188 |
189 | // Set the build output path.
190 | Settings.OutputPath = GetOutputPath(buildName);
191 |
192 | // Set the levels to include in the build.
193 | Settings.Levels = GetEnabledScenes();
194 |
195 | // Set android only settings.
196 | if (Settings.TargetGroup == BuildTargetGroup.Android)
197 | {
198 | string androidSdkPath;
199 | if (GetArgumentValue(Values.ARG_ANDROID_SDK_PATH, out androidSdkPath))
200 | Settings.AndroidSdkPath = androidSdkPath;
201 |
202 | string keyAliasName;
203 | if (GetArgumentValue(Values.ARG_ANDROID_KEY_ALIAS_NAME, out keyAliasName))
204 | Settings.AndroidKeyAliasName = keyAliasName;
205 |
206 | string keyAliasPass;
207 | if (GetArgumentValue(Values.ARG_ANDROID_KEY_ALIAS_PASS, out keyAliasPass))
208 | Settings.AndroidKeyAliasPass = keyAliasPass;
209 |
210 | string keyStoreName;
211 | if (GetArgumentValue(Values.ARG_ANDROID_KEY_STORE_NAME, out keyStoreName))
212 | Settings.AndroidKeyStoreName = keyStoreName;
213 |
214 | string keyStorePass;
215 | if (GetArgumentValue(Values.ARG_ANDROID_KEY_STORE_PASS, out keyStorePass))
216 | Settings.AndroidKeyStorePass = keyStorePass;
217 | }
218 |
219 | // Set the initial build option.
220 | Settings.Options = Values.DEFAULT_BUILD_OPTIONS;
221 |
222 | // Set additional build options to use in the build.
223 | if (HasArgument(Values.ARG_OPTION_DEVELOPMENT))
224 | Settings.Options |= BuildOptions.Development;
225 |
226 | if (HasArgument(Values.ARG_OPTION_ALLOW_DEBUGGING))
227 | Settings.Options |= BuildOptions.AllowDebugging;
228 |
229 | if (HasArgument(Values.ARG_OPTION_SYMLINK_LIBRARIES))
230 | Settings.Options |= BuildOptions.SymlinkLibraries;
231 |
232 | if (HasArgument(Values.ARG_OPTION_FORCE_ENABLE_ASSERTIONS))
233 | Settings.Options |= BuildOptions.ForceEnableAssertions;
234 |
235 | if (HasArgument(Values.ARG_OPTION_COMPRESS_WITH_LZ4))
236 | Settings.Options |= BuildOptions.CompressWithLz4;
237 |
238 | #if UNITY_2017_2_OR_NEWER
239 | if (HasArgument(Values.ARG_OPTION_COMPRESS_WITH_LZ4_HC))
240 | Settings.Options |= BuildOptions.CompressWithLz4HC;
241 | #endif
242 |
243 | if (HasArgument(Values.ARG_OPTION_STRICT_MODE))
244 | Settings.Options |= BuildOptions.StrictMode;
245 |
246 | #if UNITY_2018_1_OR_NEWER
247 | if (HasArgument(Values.ARG_OPTION_INCLUDE_TEST_ASSEMBLIES))
248 | Settings.Options |= BuildOptions.IncludeTestAssemblies;
249 | #endif
250 |
251 | // Set the application identifier if there is one.
252 | string applicationIdentifier;
253 | if (GetArgumentValue(Values.ARG_APPLICATION_IDENTIFIER, out applicationIdentifier))
254 | Settings.ApplicationIdentifier = applicationIdentifier;
255 |
256 | // Set the bundle version if there is one.
257 | string bundleVersion;
258 | if (GetArgumentValue(Values.ARG_BUNDLE_VERSION, out bundleVersion))
259 | Settings.BundleVersion = bundleVersion;
260 |
261 | // Apply the new settings.
262 | Settings.Apply();
263 |
264 | PrintSettings(Settings, "Overwrote settings:");
265 | }
266 |
267 | #endregion
268 | }
269 | }
--------------------------------------------------------------------------------
/src/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 16
7 | productGUID: 79df29de511fe7440978319946dae947
8 | AndroidProfiler: 0
9 | AndroidFilterTouchesWhenObscured: 0
10 | AndroidEnableSustainedPerformanceMode: 0
11 | defaultScreenOrientation: 4
12 | targetDevice: 2
13 | useOnDemandResources: 0
14 | accelerometerFrequency: 60
15 | companyName: DefaultCompany
16 | productName: UnityCommandLine
17 | defaultCursor: {fileID: 0}
18 | cursorHotspot: {x: 0, y: 0}
19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
20 | m_ShowUnitySplashScreen: 1
21 | m_ShowUnitySplashLogo: 1
22 | m_SplashScreenOverlayOpacity: 1
23 | m_SplashScreenAnimation: 1
24 | m_SplashScreenLogoStyle: 1
25 | m_SplashScreenDrawMode: 0
26 | m_SplashScreenBackgroundAnimationZoom: 1
27 | m_SplashScreenLogoAnimationZoom: 1
28 | m_SplashScreenBackgroundLandscapeAspect: 1
29 | m_SplashScreenBackgroundPortraitAspect: 1
30 | m_SplashScreenBackgroundLandscapeUvs:
31 | serializedVersion: 2
32 | x: 0
33 | y: 0
34 | width: 1
35 | height: 1
36 | m_SplashScreenBackgroundPortraitUvs:
37 | serializedVersion: 2
38 | x: 0
39 | y: 0
40 | width: 1
41 | height: 1
42 | m_SplashScreenLogos: []
43 | m_VirtualRealitySplashScreen: {fileID: 0}
44 | m_HolographicTrackingLossScreen: {fileID: 0}
45 | defaultScreenWidth: 1024
46 | defaultScreenHeight: 768
47 | defaultScreenWidthWeb: 960
48 | defaultScreenHeightWeb: 600
49 | m_StereoRenderingPath: 0
50 | m_ActiveColorSpace: 0
51 | m_MTRendering: 1
52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000
53 | iosShowActivityIndicatorOnLoading: -1
54 | androidShowActivityIndicatorOnLoading: -1
55 | iosAppInBackgroundBehavior: 0
56 | displayResolutionDialog: 0
57 | iosAllowHTTPDownload: 1
58 | allowedAutorotateToPortrait: 1
59 | allowedAutorotateToPortraitUpsideDown: 1
60 | allowedAutorotateToLandscapeRight: 1
61 | allowedAutorotateToLandscapeLeft: 1
62 | useOSAutorotation: 1
63 | use32BitDisplayBuffer: 1
64 | preserveFramebufferAlpha: 0
65 | disableDepthAndStencilBuffers: 0
66 | androidStartInFullscreen: 1
67 | androidRenderOutsideSafeArea: 1
68 | androidBlitType: 0
69 | defaultIsNativeResolution: 1
70 | macRetinaSupport: 1
71 | runInBackground: 1
72 | captureSingleScreen: 0
73 | muteOtherAudioSources: 0
74 | Prepare IOS For Recording: 0
75 | Force IOS Speakers When Recording: 0
76 | deferSystemGesturesMode: 0
77 | hideHomeButton: 0
78 | submitAnalytics: 1
79 | usePlayerLog: 1
80 | bakeCollisionMeshes: 0
81 | forceSingleInstance: 0
82 | resizableWindow: 0
83 | useMacAppStoreValidation: 0
84 | macAppStoreCategory: public.app-category.games
85 | gpuSkinning: 1
86 | graphicsJobs: 0
87 | xboxPIXTextureCapture: 0
88 | xboxEnableAvatar: 0
89 | xboxEnableKinect: 0
90 | xboxEnableKinectAutoTracking: 0
91 | xboxEnableFitness: 0
92 | visibleInBackground: 1
93 | allowFullscreenSwitch: 1
94 | graphicsJobMode: 0
95 | fullscreenMode: 1
96 | xboxSpeechDB: 0
97 | xboxEnableHeadOrientation: 0
98 | xboxEnableGuest: 0
99 | xboxEnablePIXSampling: 0
100 | metalFramebufferOnly: 0
101 | xboxOneResolution: 0
102 | xboxOneSResolution: 0
103 | xboxOneXResolution: 3
104 | xboxOneMonoLoggingLevel: 0
105 | xboxOneLoggingLevel: 1
106 | xboxOneDisableEsram: 0
107 | xboxOnePresentImmediateThreshold: 0
108 | switchQueueCommandMemory: 0
109 | switchQueueControlMemory: 16384
110 | switchQueueComputeMemory: 262144
111 | switchNVNShaderPoolsGranularity: 33554432
112 | switchNVNDefaultPoolsGranularity: 16777216
113 | switchNVNOtherPoolsGranularity: 16777216
114 | vulkanEnableSetSRGBWrite: 0
115 | m_SupportedAspectRatios:
116 | 4:3: 1
117 | 5:4: 1
118 | 16:10: 1
119 | 16:9: 1
120 | Others: 1
121 | bundleVersion: 0.1
122 | preloadedAssets: []
123 | metroInputSource: 0
124 | wsaTransparentSwapchain: 0
125 | m_HolographicPauseOnTrackingLoss: 1
126 | xboxOneDisableKinectGpuReservation: 1
127 | xboxOneEnable7thCore: 1
128 | vrSettings:
129 | cardboard:
130 | depthFormat: 0
131 | enableTransitionView: 0
132 | daydream:
133 | depthFormat: 0
134 | useSustainedPerformanceMode: 0
135 | enableVideoLayer: 0
136 | useProtectedVideoMemory: 0
137 | minimumSupportedHeadTracking: 0
138 | maximumSupportedHeadTracking: 1
139 | hololens:
140 | depthFormat: 1
141 | depthBufferSharingEnabled: 1
142 | lumin:
143 | depthFormat: 0
144 | frameTiming: 2
145 | enableGLCache: 0
146 | glCacheMaxBlobSize: 524288
147 | glCacheMaxFileSize: 8388608
148 | oculus:
149 | sharedDepthBuffer: 1
150 | dashSupport: 1
151 | enable360StereoCapture: 0
152 | isWsaHolographicRemotingEnabled: 0
153 | protectGraphicsMemory: 0
154 | enableFrameTimingStats: 0
155 | useHDRDisplay: 0
156 | m_ColorGamuts: 00000000
157 | targetPixelDensity: 30
158 | resolutionScalingMode: 0
159 | androidSupportedAspectRatio: 1
160 | androidMaxAspectRatio: 2.1
161 | applicationIdentifier:
162 | Standalone: com.Company.ProductName
163 | buildNumber: {}
164 | AndroidBundleVersionCode: 1
165 | AndroidMinSdkVersion: 16
166 | AndroidTargetSdkVersion: 0
167 | AndroidPreferredInstallLocation: 1
168 | aotOptions:
169 | stripEngineCode: 1
170 | iPhoneStrippingLevel: 0
171 | iPhoneScriptCallOptimization: 0
172 | ForceInternetPermission: 0
173 | ForceSDCardPermission: 0
174 | CreateWallpaper: 0
175 | APKExpansionFiles: 0
176 | keepLoadedShadersAlive: 0
177 | StripUnusedMeshComponents: 1
178 | VertexChannelCompressionMask: 4054
179 | iPhoneSdkVersion: 988
180 | iOSTargetOSVersionString: 9.0
181 | tvOSSdkVersion: 0
182 | tvOSRequireExtendedGameController: 0
183 | tvOSTargetOSVersionString: 9.0
184 | uIPrerenderedIcon: 0
185 | uIRequiresPersistentWiFi: 0
186 | uIRequiresFullScreen: 1
187 | uIStatusBarHidden: 1
188 | uIExitOnSuspend: 0
189 | uIStatusBarStyle: 0
190 | iPhoneSplashScreen: {fileID: 0}
191 | iPhoneHighResSplashScreen: {fileID: 0}
192 | iPhoneTallHighResSplashScreen: {fileID: 0}
193 | iPhone47inSplashScreen: {fileID: 0}
194 | iPhone55inPortraitSplashScreen: {fileID: 0}
195 | iPhone55inLandscapeSplashScreen: {fileID: 0}
196 | iPhone58inPortraitSplashScreen: {fileID: 0}
197 | iPhone58inLandscapeSplashScreen: {fileID: 0}
198 | iPadPortraitSplashScreen: {fileID: 0}
199 | iPadHighResPortraitSplashScreen: {fileID: 0}
200 | iPadLandscapeSplashScreen: {fileID: 0}
201 | iPadHighResLandscapeSplashScreen: {fileID: 0}
202 | iPhone65inPortraitSplashScreen: {fileID: 0}
203 | iPhone65inLandscapeSplashScreen: {fileID: 0}
204 | iPhone61inPortraitSplashScreen: {fileID: 0}
205 | iPhone61inLandscapeSplashScreen: {fileID: 0}
206 | appleTVSplashScreen: {fileID: 0}
207 | appleTVSplashScreen2x: {fileID: 0}
208 | tvOSSmallIconLayers: []
209 | tvOSSmallIconLayers2x: []
210 | tvOSLargeIconLayers: []
211 | tvOSLargeIconLayers2x: []
212 | tvOSTopShelfImageLayers: []
213 | tvOSTopShelfImageLayers2x: []
214 | tvOSTopShelfImageWideLayers: []
215 | tvOSTopShelfImageWideLayers2x: []
216 | iOSLaunchScreenType: 0
217 | iOSLaunchScreenPortrait: {fileID: 0}
218 | iOSLaunchScreenLandscape: {fileID: 0}
219 | iOSLaunchScreenBackgroundColor:
220 | serializedVersion: 2
221 | rgba: 0
222 | iOSLaunchScreenFillPct: 100
223 | iOSLaunchScreenSize: 100
224 | iOSLaunchScreenCustomXibPath:
225 | iOSLaunchScreeniPadType: 0
226 | iOSLaunchScreeniPadImage: {fileID: 0}
227 | iOSLaunchScreeniPadBackgroundColor:
228 | serializedVersion: 2
229 | rgba: 0
230 | iOSLaunchScreeniPadFillPct: 100
231 | iOSLaunchScreeniPadSize: 100
232 | iOSLaunchScreeniPadCustomXibPath:
233 | iOSUseLaunchScreenStoryboard: 0
234 | iOSLaunchScreenCustomStoryboardPath:
235 | iOSDeviceRequirements: []
236 | iOSURLSchemes: []
237 | iOSBackgroundModes: 0
238 | iOSMetalForceHardShadows: 0
239 | metalEditorSupport: 1
240 | metalAPIValidation: 1
241 | iOSRenderExtraFrameOnPause: 0
242 | appleDeveloperTeamID:
243 | iOSManualSigningProvisioningProfileID:
244 | tvOSManualSigningProvisioningProfileID:
245 | iOSManualSigningProvisioningProfileType: 0
246 | tvOSManualSigningProvisioningProfileType: 0
247 | appleEnableAutomaticSigning: 0
248 | iOSRequireARKit: 0
249 | iOSAutomaticallyDetectAndAddCapabilities: 1
250 | appleEnableProMotion: 0
251 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
252 | templatePackageId: com.unity.template.3d@2.3.1
253 | templateDefaultScene: Assets/Scenes/SampleScene.unity
254 | AndroidTargetArchitectures: 1
255 | AndroidSplashScreenScale: 0
256 | androidSplashScreen: {fileID: 0}
257 | AndroidKeystoreName: '{inproject}: '
258 | AndroidKeyaliasName:
259 | AndroidBuildApkPerCpuArchitecture: 0
260 | AndroidTVCompatibility: 0
261 | AndroidIsGame: 1
262 | AndroidEnableTango: 0
263 | androidEnableBanner: 1
264 | androidUseLowAccuracyLocation: 0
265 | androidUseCustomKeystore: 0
266 | m_AndroidBanners:
267 | - width: 320
268 | height: 180
269 | banner: {fileID: 0}
270 | androidGamepadSupportLevel: 0
271 | resolutionDialogBanner: {fileID: 0}
272 | m_BuildTargetIcons: []
273 | m_BuildTargetPlatformIcons: []
274 | m_BuildTargetBatching:
275 | - m_BuildTarget: Standalone
276 | m_StaticBatching: 1
277 | m_DynamicBatching: 0
278 | - m_BuildTarget: tvOS
279 | m_StaticBatching: 1
280 | m_DynamicBatching: 0
281 | - m_BuildTarget: Android
282 | m_StaticBatching: 1
283 | m_DynamicBatching: 0
284 | - m_BuildTarget: iPhone
285 | m_StaticBatching: 1
286 | m_DynamicBatching: 0
287 | - m_BuildTarget: WebGL
288 | m_StaticBatching: 0
289 | m_DynamicBatching: 0
290 | m_BuildTargetGraphicsAPIs:
291 | - m_BuildTarget: AndroidPlayer
292 | m_APIs: 150000000b000000
293 | m_Automatic: 0
294 | - m_BuildTarget: iOSSupport
295 | m_APIs: 10000000
296 | m_Automatic: 1
297 | - m_BuildTarget: AppleTVSupport
298 | m_APIs: 10000000
299 | m_Automatic: 0
300 | - m_BuildTarget: WebGLSupport
301 | m_APIs: 0b000000
302 | m_Automatic: 1
303 | m_BuildTargetVRSettings:
304 | - m_BuildTarget: Standalone
305 | m_Enabled: 0
306 | m_Devices:
307 | - Oculus
308 | - OpenVR
309 | m_BuildTargetEnableVuforiaSettings: []
310 | openGLRequireES31: 0
311 | openGLRequireES31AEP: 0
312 | openGLRequireES32: 0
313 | m_TemplateCustomTags: {}
314 | mobileMTRendering:
315 | Android: 1
316 | iPhone: 1
317 | tvOS: 1
318 | m_BuildTargetGroupLightmapEncodingQuality: []
319 | m_BuildTargetGroupLightmapSettings: []
320 | playModeTestRunnerEnabled: 0
321 | runPlayModeTestAsEditModeTest: 0
322 | actionOnDotNetUnhandledException: 1
323 | enableInternalProfiler: 0
324 | logObjCUncaughtExceptions: 1
325 | enableCrashReportAPI: 0
326 | cameraUsageDescription:
327 | locationUsageDescription:
328 | microphoneUsageDescription:
329 | switchNetLibKey:
330 | switchSocketMemoryPoolSize: 6144
331 | switchSocketAllocatorPoolSize: 128
332 | switchSocketConcurrencyLimit: 14
333 | switchScreenResolutionBehavior: 2
334 | switchUseCPUProfiler: 0
335 | switchApplicationID: 0x01004b9000490000
336 | switchNSODependencies:
337 | switchTitleNames_0:
338 | switchTitleNames_1:
339 | switchTitleNames_2:
340 | switchTitleNames_3:
341 | switchTitleNames_4:
342 | switchTitleNames_5:
343 | switchTitleNames_6:
344 | switchTitleNames_7:
345 | switchTitleNames_8:
346 | switchTitleNames_9:
347 | switchTitleNames_10:
348 | switchTitleNames_11:
349 | switchTitleNames_12:
350 | switchTitleNames_13:
351 | switchTitleNames_14:
352 | switchPublisherNames_0:
353 | switchPublisherNames_1:
354 | switchPublisherNames_2:
355 | switchPublisherNames_3:
356 | switchPublisherNames_4:
357 | switchPublisherNames_5:
358 | switchPublisherNames_6:
359 | switchPublisherNames_7:
360 | switchPublisherNames_8:
361 | switchPublisherNames_9:
362 | switchPublisherNames_10:
363 | switchPublisherNames_11:
364 | switchPublisherNames_12:
365 | switchPublisherNames_13:
366 | switchPublisherNames_14:
367 | switchIcons_0: {fileID: 0}
368 | switchIcons_1: {fileID: 0}
369 | switchIcons_2: {fileID: 0}
370 | switchIcons_3: {fileID: 0}
371 | switchIcons_4: {fileID: 0}
372 | switchIcons_5: {fileID: 0}
373 | switchIcons_6: {fileID: 0}
374 | switchIcons_7: {fileID: 0}
375 | switchIcons_8: {fileID: 0}
376 | switchIcons_9: {fileID: 0}
377 | switchIcons_10: {fileID: 0}
378 | switchIcons_11: {fileID: 0}
379 | switchIcons_12: {fileID: 0}
380 | switchIcons_13: {fileID: 0}
381 | switchIcons_14: {fileID: 0}
382 | switchSmallIcons_0: {fileID: 0}
383 | switchSmallIcons_1: {fileID: 0}
384 | switchSmallIcons_2: {fileID: 0}
385 | switchSmallIcons_3: {fileID: 0}
386 | switchSmallIcons_4: {fileID: 0}
387 | switchSmallIcons_5: {fileID: 0}
388 | switchSmallIcons_6: {fileID: 0}
389 | switchSmallIcons_7: {fileID: 0}
390 | switchSmallIcons_8: {fileID: 0}
391 | switchSmallIcons_9: {fileID: 0}
392 | switchSmallIcons_10: {fileID: 0}
393 | switchSmallIcons_11: {fileID: 0}
394 | switchSmallIcons_12: {fileID: 0}
395 | switchSmallIcons_13: {fileID: 0}
396 | switchSmallIcons_14: {fileID: 0}
397 | switchManualHTML:
398 | switchAccessibleURLs:
399 | switchLegalInformation:
400 | switchMainThreadStackSize: 1048576
401 | switchPresenceGroupId:
402 | switchLogoHandling: 0
403 | switchReleaseVersion: 0
404 | switchDisplayVersion: 1.0.0
405 | switchStartupUserAccount: 0
406 | switchTouchScreenUsage: 0
407 | switchSupportedLanguagesMask: 0
408 | switchLogoType: 0
409 | switchApplicationErrorCodeCategory:
410 | switchUserAccountSaveDataSize: 0
411 | switchUserAccountSaveDataJournalSize: 0
412 | switchApplicationAttribute: 0
413 | switchCardSpecSize: -1
414 | switchCardSpecClock: -1
415 | switchRatingsMask: 0
416 | switchRatingsInt_0: 0
417 | switchRatingsInt_1: 0
418 | switchRatingsInt_2: 0
419 | switchRatingsInt_3: 0
420 | switchRatingsInt_4: 0
421 | switchRatingsInt_5: 0
422 | switchRatingsInt_6: 0
423 | switchRatingsInt_7: 0
424 | switchRatingsInt_8: 0
425 | switchRatingsInt_9: 0
426 | switchRatingsInt_10: 0
427 | switchRatingsInt_11: 0
428 | switchLocalCommunicationIds_0:
429 | switchLocalCommunicationIds_1:
430 | switchLocalCommunicationIds_2:
431 | switchLocalCommunicationIds_3:
432 | switchLocalCommunicationIds_4:
433 | switchLocalCommunicationIds_5:
434 | switchLocalCommunicationIds_6:
435 | switchLocalCommunicationIds_7:
436 | switchParentalControl: 0
437 | switchAllowsScreenshot: 1
438 | switchAllowsVideoCapturing: 1
439 | switchAllowsRuntimeAddOnContentInstall: 0
440 | switchDataLossConfirmation: 0
441 | switchUserAccountLockEnabled: 0
442 | switchSystemResourceMemory: 16777216
443 | switchSupportedNpadStyles: 3
444 | switchNativeFsCacheSize: 32
445 | switchIsHoldTypeHorizontal: 0
446 | switchSupportedNpadCount: 8
447 | switchSocketConfigEnabled: 0
448 | switchTcpInitialSendBufferSize: 32
449 | switchTcpInitialReceiveBufferSize: 64
450 | switchTcpAutoSendBufferSizeMax: 256
451 | switchTcpAutoReceiveBufferSizeMax: 256
452 | switchUdpSendBufferSize: 9
453 | switchUdpReceiveBufferSize: 42
454 | switchSocketBufferEfficiency: 4
455 | switchSocketInitializeEnabled: 1
456 | switchNetworkInterfaceManagerInitializeEnabled: 1
457 | switchPlayerConnectionEnabled: 1
458 | ps4NPAgeRating: 12
459 | ps4NPTitleSecret:
460 | ps4NPTrophyPackPath:
461 | ps4ParentalLevel: 11
462 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
463 | ps4Category: 0
464 | ps4MasterVersion: 01.00
465 | ps4AppVersion: 01.00
466 | ps4AppType: 0
467 | ps4ParamSfxPath:
468 | ps4VideoOutPixelFormat: 0
469 | ps4VideoOutInitialWidth: 1920
470 | ps4VideoOutBaseModeInitialWidth: 1920
471 | ps4VideoOutReprojectionRate: 60
472 | ps4PronunciationXMLPath:
473 | ps4PronunciationSIGPath:
474 | ps4BackgroundImagePath:
475 | ps4StartupImagePath:
476 | ps4StartupImagesFolder:
477 | ps4IconImagesFolder:
478 | ps4SaveDataImagePath:
479 | ps4SdkOverride:
480 | ps4BGMPath:
481 | ps4ShareFilePath:
482 | ps4ShareOverlayImagePath:
483 | ps4PrivacyGuardImagePath:
484 | ps4NPtitleDatPath:
485 | ps4RemotePlayKeyAssignment: -1
486 | ps4RemotePlayKeyMappingDir:
487 | ps4PlayTogetherPlayerCount: 0
488 | ps4EnterButtonAssignment: 1
489 | ps4ApplicationParam1: 0
490 | ps4ApplicationParam2: 0
491 | ps4ApplicationParam3: 0
492 | ps4ApplicationParam4: 0
493 | ps4DownloadDataSize: 0
494 | ps4GarlicHeapSize: 2048
495 | ps4ProGarlicHeapSize: 2560
496 | playerPrefsMaxSize: 32768
497 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
498 | ps4pnSessions: 1
499 | ps4pnPresence: 1
500 | ps4pnFriends: 1
501 | ps4pnGameCustomData: 1
502 | playerPrefsSupport: 0
503 | enableApplicationExit: 0
504 | resetTempFolder: 1
505 | restrictedAudioUsageRights: 0
506 | ps4UseResolutionFallback: 0
507 | ps4ReprojectionSupport: 0
508 | ps4UseAudio3dBackend: 0
509 | ps4SocialScreenEnabled: 0
510 | ps4ScriptOptimizationLevel: 0
511 | ps4Audio3dVirtualSpeakerCount: 14
512 | ps4attribCpuUsage: 0
513 | ps4PatchPkgPath:
514 | ps4PatchLatestPkgPath:
515 | ps4PatchChangeinfoPath:
516 | ps4PatchDayOne: 0
517 | ps4attribUserManagement: 0
518 | ps4attribMoveSupport: 0
519 | ps4attrib3DSupport: 0
520 | ps4attribShareSupport: 0
521 | ps4attribExclusiveVR: 0
522 | ps4disableAutoHideSplash: 0
523 | ps4videoRecordingFeaturesUsed: 0
524 | ps4contentSearchFeaturesUsed: 0
525 | ps4attribEyeToEyeDistanceSettingVR: 0
526 | ps4IncludedModules: []
527 | monoEnv:
528 | splashScreenBackgroundSourceLandscape: {fileID: 0}
529 | splashScreenBackgroundSourcePortrait: {fileID: 0}
530 | spritePackerPolicy:
531 | webGLMemorySize: 16
532 | webGLExceptionSupport: 1
533 | webGLNameFilesAsHashes: 0
534 | webGLDataCaching: 1
535 | webGLDebugSymbols: 0
536 | webGLEmscriptenArgs:
537 | webGLModulesDirectory:
538 | webGLTemplate: APPLICATION:Default
539 | webGLAnalyzeBuildSize: 0
540 | webGLUseEmbeddedResources: 0
541 | webGLCompressionFormat: 1
542 | webGLLinkerTarget: 1
543 | webGLThreadsSupport: 0
544 | webGLWasmStreaming: 0
545 | scriptingDefineSymbols: {}
546 | platformArchitecture: {}
547 | scriptingBackend: {}
548 | il2cppCompilerConfiguration: {}
549 | managedStrippingLevel: {}
550 | incrementalIl2cppBuild: {}
551 | allowUnsafeCode: 0
552 | additionalIl2CppArgs:
553 | scriptingRuntimeVersion: 1
554 | gcIncremental: 0
555 | gcWBarrierValidation: 0
556 | apiCompatibilityLevelPerPlatform: {}
557 | m_RenderingPath: 1
558 | m_MobileRenderingPath: 1
559 | metroPackageName: Template_3D
560 | metroPackageVersion:
561 | metroCertificatePath:
562 | metroCertificatePassword:
563 | metroCertificateSubject:
564 | metroCertificateIssuer:
565 | metroCertificateNotAfter: 0000000000000000
566 | metroApplicationDescription: Template_3D
567 | wsaImages: {}
568 | metroTileShortName:
569 | metroTileShowName: 0
570 | metroMediumTileShowName: 0
571 | metroLargeTileShowName: 0
572 | metroWideTileShowName: 0
573 | metroSupportStreamingInstall: 0
574 | metroLastRequiredScene: 0
575 | metroDefaultTileSize: 1
576 | metroTileForegroundText: 2
577 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
578 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
579 | a: 1}
580 | metroSplashScreenUseBackgroundColor: 0
581 | platformCapabilities: {}
582 | metroTargetDeviceFamilies: {}
583 | metroFTAName:
584 | metroFTAFileTypes: []
585 | metroProtocolName:
586 | XboxOneProductId:
587 | XboxOneUpdateKey:
588 | XboxOneSandboxId:
589 | XboxOneContentId:
590 | XboxOneTitleId:
591 | XboxOneSCId:
592 | XboxOneGameOsOverridePath:
593 | XboxOnePackagingOverridePath:
594 | XboxOneAppManifestOverridePath:
595 | XboxOneVersion: 1.0.0.0
596 | XboxOnePackageEncryption: 0
597 | XboxOnePackageUpdateGranularity: 2
598 | XboxOneDescription:
599 | XboxOneLanguage:
600 | - enus
601 | XboxOneCapability: []
602 | XboxOneGameRating: {}
603 | XboxOneIsContentPackage: 0
604 | XboxOneEnableGPUVariability: 1
605 | XboxOneSockets: {}
606 | XboxOneSplashScreen: {fileID: 0}
607 | XboxOneAllowedProductIds: []
608 | XboxOnePersistentLocalStorageSize: 0
609 | XboxOneXTitleMemory: 8
610 | xboxOneScriptCompiler: 1
611 | XboxOneOverrideIdentityName:
612 | vrEditorSettings:
613 | daydream:
614 | daydreamIconForeground: {fileID: 0}
615 | daydreamIconBackground: {fileID: 0}
616 | cloudServicesEnabled:
617 | UNet: 1
618 | luminIcon:
619 | m_Name:
620 | m_ModelFolderPath:
621 | m_PortalFolderPath:
622 | luminCert:
623 | m_CertPath:
624 | m_SignPackage: 1
625 | luminIsChannelApp: 0
626 | luminVersion:
627 | m_VersionCode: 1
628 | m_VersionName:
629 | facebookSdkVersion: 7.9.4
630 | facebookAppId:
631 | facebookCookies: 1
632 | facebookLogging: 1
633 | facebookStatus: 1
634 | facebookXfbml: 0
635 | facebookFrictionlessRequests: 1
636 | apiCompatibilityLevel: 6
637 | cloudProjectId:
638 | framebufferDepthMemorylessMode: 0
639 | projectName:
640 | organizationId:
641 | cloudEnabled: 0
642 | enableNativePlatformBackendsForNewInputSystem: 0
643 | disableOldInputManagerSupport: 0
644 | legacyClampBlendShapeWeights: 1
645 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity Command Line
2 |
3 | Unity Command Line extends the Unity's command line.
4 |
5 | Supports Unity 2019.1 down to Unity 5.3.
6 |
7 | ## Example
8 |
9 | ```cmd
10 | Unity.exe -batchmode
11 | -executeMethod BuildPlayerCommand.Execute
12 | -logFile
13 | -nographics
14 | -projectPath
15 | -quit
16 | -silent-crashes
17 | -buildTarget Win64
18 | -buildName HelloWorld
19 | -applicationIdentifier com.company.example
20 | -bundleVersion 1.2.3
21 | -optionDevelopment
22 | -optionAllowDebugging
23 | ```
24 |
25 | ## Commands
26 |
27 | | Commands | Details |
28 | |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
29 | | BuildPlayerCommand.Execute | Uses `BuildPipeline.BuildPlayer` to create a build (for example `-executeMethod BuildPlayerCommand.Execute -buildTarget Win64 -buildName HelloWorld`). |
30 | | BuildIosCommand.Execute | Uses `BuildPipeline.BuildPlayer` to create an Xcode project (for example `-executeMethod BuildIosCommand.Execute`). |
31 | | BuildAssetBundlesCommand.Execute | Uses `BuildPipeline.BuildAssetBundles` to create asset bundle files (for example `-executeMethod BuildAssetBundlesCommand.Execute -buildTarget Win64 -bundleName HelloWorld`). |
32 | | ExportPackageCommand.Execute | Uses `AssetDatabase.ExportPackage` to create a .unitypackage (for example `-executeMethod ExportPackageCommand.Execute -packageContents "Assets\UnityCommandLine" -packageName UnityCommandLine -optionRecurse`). |
33 |
34 | ## Options
35 |
36 | You can run the Editor and built Unity games with additional commands and information on startup. This section describes the command line options available.
37 |
38 | ### Built-in
39 |
40 | | Options | Details |
41 | |---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
42 | | -batchmode | Run Unity in batch mode. You should always use this in conjunction with the other command line arguments, because it ensures no pop-up windows appear and eliminates the need for any human intervention. When an exception occurs during execution of the script code, the Asset server updates fail, or other operations fail, Unity immediately exits with return code `1`. Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information. You cannot open a project in batch mode while the Editor has the same project open; only a single instance of Unity can run at a time. Tip: To check whether you are running the Editor or Standalone Player in batch mode, use the `Application.isBatchMode` operator. If the project has not yet been imported when using `-batchmode`, the target platform is the default one. To force a different platform when using `-batchmode`, use the `-buildTarget` option. |
43 | | -executeMethod <ClassName.MethodName> | Execute the static method as soon as Unity opens the project, and after the optional Asset server update is complete. You can use this to do tasks such as continous integration, performing Unit Tests, making builds or preparing data. To return an error from the command line process, either throw an exception which causes Unity to exit with return code `1`, or call `EditorApplication.Exit` with a `non-zero` return code. To pass parameters, add them to the command line and retrieve them inside the function using `System.Environment.GetCommandLineArgs`. To use `-executeMethod`, you need to place the enclosing script in an Editor folder. The method you execute must be defined as static. |
44 | | -logFile <LogFilePath> | Specify where Unity writes the Editor or Windows/Linux/OSX standalone log file. To output to the console, specify `-` for the path name. On Windows, specify `-` option to ensure output goes to `stdout`, which is not the console by default. |
45 | | -nographics | When running in batch mode, do not initialize the graphics device at all. This makes it possible to run your automated workflows on machines that don’t even have a GPU (automated workflows only work when you have a window in focus, otherwise you can’t send simulated input commands). Note that `-nographics` does not allow you to bake GI, because `Enlighten` requires GPU acceleration. |
46 | | -noUpm | Disables the Unity Package Manager. |
47 | | -projectPath <ProjectDirectory> | Open the project at the given path. |
48 | | -quit | Quit the Unity Editor after other commands have finished executing. Note that this can cause error messages to be hidden (however, they still appear in the Editor.log file). |
49 | | -silent-crashes | Prevent Unity from displaying the dialog that appears when a Standalone Player crashes. This argument is useful when you want to run the Player in automated builds or tests, where you don’t want a dialog prompt to obstruct automation. |
50 | | -buildTarget | Allows the selection of an active build target before loading a project. Possible options are: `standalone`, `Win`, `Win64`, `OSXUniversal`, `Linux`, `Linux64`, `LinuxUniversal`, `iOS`, `Android`, `Web`, `WebStreamed`, `WebGL`, `XboxOne`, `PS4`, `WindowsStoreApps`, `Switch`, `N3DS`, `tvOS`. |
51 |
52 | ### BuildPlayerCommand
53 |
54 | | Options | Details |
55 | |------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
56 | | -buildTarget | Allows the selection of an active build target before loading a project. Possible options are: `standalone`, `Win`, `Win64`, `OSXUniversal`, `Linux`, `Linux64`, `LinuxUniversal`, `iOS`, `Android`, `Web`, `WebStreamed`, `WebGL`, `XboxOne`, `PS4`, `WindowsStoreApps`, `Switch`, `N3DS`, `tvOS`. |
57 | | -buildName | Sets the output file name (for example `-buildName HelloWorld` will output `Builds\HelloWorld.exe`). |
58 | | -applicationIdentifier | Sets `PlayerSettings.applicationIdentifier` (for example, `-applicationIdentifier com.company.example`). |
59 | | -bundleVersion | Sets `PlayerSettings.bundleVersion` (for example, `-bundleVersion 1.2.3`). |
60 | | -androidSdkPath | Sets `EditorPrefs.SetString("AndroidSdkRoot", value)` (for example, `-androidSdkPath "C:\Users\Me\AppData\Local\Android\Sdk\"`). |
61 | | -androidKeyAliasName | Sets `PlayerSettings.Android.keyaliasName` (for example, `-androidKeyAliasName com.company.product`). |
62 | | -androidKeyAliasPass | Sets `PlayerSettings.Android.keyaliasPass` (for example, `-androidKeyAliasPass password123`). |
63 | | -androidKeyStoreName | Sets `PlayerSettings.Android.keystoreName` (for example, `-androidKeyStoreName "C:\Users\John\Documents\hello.keystore"`). |
64 | | -androidKeyStorePass | Sets `PlayerSettings.Android.keystorePass` (for example, `-androidKeyStorePass 123pass`). |
65 | | -optionDevelopment | Adds `BuildOptions.Development` (for example, `-optionDevelopment`). |
66 | | -optionAllowDebugging | Adds `BuildOptions.AllowDebugging` (for example, `-optionAllowDebugging`). |
67 | | -optionSymlinkLibraries | Adds `BuildOptions.SymlinkLibraries` (for example, `-optionSymlinkLibraries`). |
68 | | -optionForceEnableAssertions | Adds `BuildOptions.ForceEnableAssertions` (for example, `-optionForceEnableAssertions`). |
69 | | -optionCompressWithLz4 | Adds `BuildOptions.CompressWithLz4` (for example, `-optionCompressWithLz4`). |
70 | | -optionCompressWithLz4HC | Adds `BuildOptions.CompressWithLz4HC` (for example, `-optionCompressWithLz4HC`). Only on Unity 2017.2 or higher. |
71 | | -optionStrictMode | Adds `BuildOptions.StrictMode`(for example, `-optionStrictMode`). |
72 | | -optionIncludeTestAssemblies | Adds `BuildOptions.IncludeTestAssemblies` (for example, `-optionIncludeTestAssemblies`). Only on Unity 2018.1 or higher. |
73 |
74 | ### BuildAssetBundlesCommand
75 |
76 | | Options | Details |
77 | |------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
78 | | -buildTarget | Allows the selection of an active build target before loading a project. Possible options are: `standalone`, `Win`, `Win64`, `OSXUniversal`, `Linux`, `Linux64`, `LinuxUniversal`, `iOS`, `Android`, `Web`, `WebStreamed`, `WebGL`, `XboxOne`, `PS4`, `WindowsStoreApps`, `Switch`, `N3DS`, `tvOS`. |
79 | | -bundleName | Sets the output file name (for example `-bundleName HelloWorld` will output `AssetBundles\HelloWorld\`). |
80 | | -optionUncompressedAssetBundle | Adds `BuildAssetBundleOptions.UncompressedAssetBundle` (for example, `-optionUncompressedAssetBundle`). |
81 | | -optionDisableWriteTypeTree | Adds `BuildAssetBundleOptions.DisableWriteTypeTree` (for example, `-optionDisableWriteTypeTree`). |
82 | | -optionDeterministicAssetBundle | Adds `BuildAssetBundleOptions.DeterministicAssetBundle` (for example, `-optionDeterministicAssetBundle`). |
83 | | -optionForceRebuildAssetBundle | Adds `BuildAssetBundleOptions.ForceRebuildAssetBundle` (for example, `-optionForceRebuildAssetBundle`). |
84 | | -optionIgnoreTypeTreeChanges | Adds `BuildAssetBundleOptions.IgnoreTypeTreeChanges` (for example, `-optionIgnoreTypeTreeChanges`). |
85 | | -optionAppendHashToAssetBundleName | Adds `BuildAssetBundleOptions.AppendHashToAssetBundleName` (for example, `-optionAppendHashToAssetBundleName`). |
86 | | -optionChunkBasedCompression | Adds `BuildAssetBundleOptions.ChunkBasedCompression`(for example, `-optionChunkBasedCompression`). Only on Unity 5.3 or higher. |
87 | | -optionStrictMode | Adds `BuildAssetBundleOptions.StrictMode` (for example, `-optionStrictMode`). Only on Unity 5.4 or higher. |
88 | | -optionOmitClassVersions | Adds `BuildAssetBundleOptions.OmitClassVersions` (for example, `-optionOmitClassVersions`). Only on Unity 5.4. |
89 | | -optionDryRunBuild | Adds `BuildAssetBundleOptions.DryRunBuild` (for example, `-optionDryRunBuild`). Only on Unity 5.5 or higher. |
90 | | -optionDisableLoadAssetByFileName | Adds `BuildAssetBundleOptions.DisableLoadAssetByFileName` (for example, `-optionDisableLoadAssetByFileName`). Only on Unity 2017.1 or higher. |
91 | | -optionDisableLoadAssetByFileNameWithExtension | Adds `BuildAssetBundleOptions.DisableLoadAssetByFileNameWithExtension` (for example, `-optionDisableLoadAssetByFileNameWithExtension`). Only on Unity 2017.1 or higher. |
92 |
93 | ### ExportPackageCommand
94 |
95 | | Options | Details |
96 | |-------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
97 | | -packageContents <CommaSeparatedFilesOrFolders> | Sets the `assetPathNames` in `AssetDatabase.ExportPackage` (for example, `-packageContents "Assets\file.dat,Assets\Folder"`). |
98 | | -packageName | Sets the output file name (for example `-packageName HelloWorld` will output `UnityPackages\HelloWorld.unitypackage`). |
99 | | -optionRecurse | Adds `ExportPackageOptions.Recurse` (for example `-optionRecurse`). |
100 | | -optionIncludeDependencies | Adds `ExportPackageOptions.IncludeDependencies` (for example `-optionIncludeDependencies`). |
101 | | -optionIncludeLibraryAssets | Adds `ExportPackageOptions.IncludeLibraryAssets` (for example `-optionIncludeLibraryAssets`). |
102 |
103 | ## Installation
104 |
105 | Simply clone the repository and copy the `Assets\UnityCommandLine` folder and you're good to go.
106 |
107 | ## Contributing
108 |
109 | Suggestions and contributions are always welcome.
110 | Make sure to read the [Contribution Guidelines][contributing] file for more information before submitting a `pull request`.
111 |
112 | ## Credits
113 |
114 | See the [Credits][credits] file to view the whole list.
115 |
116 | ## License
117 |
118 | `UnityCommandLine` is released under the MIT License. See the [LICENSE][license] file for details.
119 |
120 | [//]: # (Links)
121 | [contributing]: CONTRIBUTING.md
122 | [credits]: CREDITS.md
123 | [license]: LICENSE
--------------------------------------------------------------------------------