Skip to content

Commit 8f7049f

Browse files
committed
Merge branch 'develop'
2 parents 218ada4 + ba3ac99 commit 8f7049f

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 6.1.2
2+
- `UseUnity` requires all parameters specified
3+
14
# 6.1.1
25
- Use `ConfigureHostConfiguration` instead of `ConfigureAppConfiguration`
36

MainProject/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<LangVersion>9.0</LangVersion>
44
<Nullable>enable</Nullable>
55

6-
<CurrentVersion>6.1.1</CurrentVersion>
6+
<CurrentVersion>6.1.2</CurrentVersion>
77

88
<Version>$(CurrentVersion)</Version>
99
<PakcageVersion>$(CurrentVersion)</PakcageVersion>

UnityProject/Injecter.Unity/Assets/Injecter.Hosting.Unity/UnityHostBuilderExtensions.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ public static IHostBuilder UseUnityLifetime(this IHostBuilder hostBuilder) =>
3737
/// Configure <see cref="IHost"/> to sensible defaults for Unity
3838
/// </summary>
3939
/// <param name="configureOptions">The delegate for configuring the <see cref="UnityLifetime"/>.</param>
40-
/// <param name="ignoreCommandLineArgs">Don't add command line parameters. Defaults to false</param>
41-
/// <param name="ignoreEnvironmentVariables">Don't add environment variables. Defaults to false</param>
40+
/// <param name="ignoreCommandLineArgs">Don't add command line parameters</param>
41+
/// <param name="ignoreEnvironmentVariables">Don't add environment variables</param>
4242
/// <param name="jsonConfigurations">Text assets which contain json data. Load the files using <see cref="Resources.Load(string)"/> or use the new Addressables package.</param>
4343
/// <returns>The original builder</returns>
4444
public static IHostBuilder UseUnity
4545
(
4646
this IHostBuilder builder,
4747
Action<UnityLifeTimeOptions> configureOptions,
48-
bool ignoreCommandLineArgs = false,
49-
bool ignoreEnvironmentVariables = false,
50-
params TextAsset[] jsonConfigurations
48+
bool ignoreCommandLineArgs,
49+
bool ignoreEnvironmentVariables,
50+
TextAsset[] jsonConfigurations
5151
)
5252
{
5353
var resourcesFolder = Path.GetFullPath(Application.dataPath);
@@ -64,9 +64,12 @@ params TextAsset[] jsonConfigurations
6464
if (!ignoreCommandLineArgs) configurationBuilder.AddCommandLine(Environment.GetCommandLineArgs());
6565
if (!ignoreEnvironmentVariables) configurationBuilder.AddEnvironmentVariables();
6666

67-
foreach (var jsonConfiguration in jsonConfigurations.Select(c => c.text.ToStream()))
67+
if (jsonConfigurations != null)
6868
{
69-
configurationBuilder.AddJsonStream(jsonConfiguration);
69+
foreach (var jsonConfiguration in jsonConfigurations.Select(c => c.text.ToStream()))
70+
{
71+
configurationBuilder.AddJsonStream(jsonConfiguration);
72+
}
7073
}
7174
});
7275

UnityProject/Injecter.Unity/Assets/Injecter.Hosting.Unity/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.injecter.hosting.unity",
3-
"version": "6.1.1",
3+
"version": "6.1.2",
44
"displayName": "Injecter.Hosting.Unity",
55
"license": "MIT",
66
"licensesUrl": "https://github.com/KuraiAndras/Injecter/blob/master/LICENSE.md",
@@ -13,6 +13,6 @@
1313
"url": "https://github.com/KuraiAndras/Injecter"
1414
},
1515
"dependencies": {
16-
"com.injecter.unity": "6.1.1"
16+
"com.injecter.unity": "6.1.2"
1717
}
1818
}

UnityProject/Injecter.Unity/Assets/Injecter.Unity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.injecter.unity",
3-
"version": "6.1.1",
3+
"version": "6.1.2",
44
"displayName": "Injecter.Unity",
55
"license": "MIT",
66
"licensesUrl": "https://github.com/KuraiAndras/Injecter/blob/master/LICENSE.md",

0 commit comments

Comments
 (0)