Skip to content

Commit c81279a

Browse files
committed
Merge branch 'master' into 'release'
Release 2.2.1 See merge request voltstro-studios/uwb/unitywebbrowser!4
2 parents 0bb316f + 20edd9b commit c81279a

File tree

26 files changed

+234
-166
lines changed

26 files changed

+234
-166
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.2.1] - 2024-10-06
8+
9+
### Added
10+
11+
- Added Incognito mode
12+
13+
### Changed
14+
15+
- Updated CEF to 129.0.11
16+
- CachePath can only be set before HasInitialized
17+
- LogPath can only be set before HasInitialized
18+
- Change some path building to use `Path.Combine` instead
19+
20+
### Deprecated
21+
22+
- Cache control is no longer used. A cache path will always be used now. To use a incognito/private mode, where no profile-specific data is persisted to disk, set incognito mode to true.
23+
24+
### Fixed
25+
26+
- Do not pass proxy settings if ProxyServer is false
27+
- Fix missing icudtl.dat on Linux cef (#346)
28+
729
## [2.2.0] - 2024-09-20
830

931
### Added

docs/articles/dev/dev-guide.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@ To setup UWB's git repo, see the [setup section](setup.md).
1414
## Developing
1515

1616
When developing for UWB, it is highly recommended to develop using the `src/UnityWebBrowser.UnityProject` project provided in the repo. Other means of development will **NOT** be supported! Even if you are creating an external separate package for UWB, it is still recommended to develop using the provided project in the repo! We recommend this approach as the Unity project has all dependencies ready to go, all the tools, and proper projects setup for the code (both Engine and Core).
17-
18-
## Packaging
19-
20-
TODO

docs/articles/user/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ To know what packages you need, checkout the [packages section](packages.md).
5353

5454
Most developers will probably only need the 'Core' package, and a single engine with it's native Windows binaries. A basic installation might look like this.
5555

56-
![Packages](~/assets/images/articles/user/packages/StandardPackages.webp)
56+
![Packages](~/assets/images/articles/user/setup/StandardPackages.webp)
5757

5858
If you plan on providing builds of your game for Linux and MacOS, install their native engine packages as well.
5959

src/Packages/UnityWebBrowser.Engine.Cef.Linux-x64/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev.voltstro.unitywebbrowser.engine.cef.linux.x64",
33
"displayName": "Unity Web Browser CEF Engine (Linux x64)",
44
"description": "CEF engine for Unity Web Browser (Linux x64).",
5-
"version": "2.2.0-128.4.9",
5+
"version": "2.2.1-129.0.11",
66
"unity": "2021.3",
77
"author": {
88
"name": "Voltstro",
@@ -17,6 +17,6 @@
1717
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
1818
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
1919
"dependencies": {
20-
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.0-128.4.9"
20+
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.1-129.0.11"
2121
}
2222
}

src/Packages/UnityWebBrowser.Engine.Cef.MacOS-arm64/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev.voltstro.unitywebbrowser.engine.cef.macos.arm64",
33
"displayName": "Unity Web Browser CEF Engine (MacOS arm64)",
44
"description": "CEF engine for Unity Web Browser (MacOS arm64).",
5-
"version": "2.2.0-128.4.9",
5+
"version": "2.2.1-129.0.11",
66
"unity": "2021.2",
77
"author": {
88
"name": "Voltstro",
@@ -17,6 +17,6 @@
1717
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
1818
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
1919
"dependencies": {
20-
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.0-128.4.9"
20+
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.1-129.0.11"
2121
}
2222
}

src/Packages/UnityWebBrowser.Engine.Cef.MacOS-x64/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev.voltstro.unitywebbrowser.engine.cef.macos.x64",
33
"displayName": "Unity Web Browser CEF Engine (MacOS x64)",
44
"description": "CEF engine for Unity Web Browser (MacOS x64).",
5-
"version": "2.2.0-128.4.9",
5+
"version": "2.2.1-129.0.11",
66
"unity": "2021.2",
77
"author": {
88
"name": "Voltstro",
@@ -17,6 +17,6 @@
1717
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
1818
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
1919
"dependencies": {
20-
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.0-128.4.9"
20+
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.1-129.0.11"
2121
}
2222
}

src/Packages/UnityWebBrowser.Engine.Cef.Win-x64/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev.voltstro.unitywebbrowser.engine.cef.win.x64",
33
"displayName": "Unity Web Browser CEF Engine (Win x64)",
44
"description": "CEF engine for Unity Web Browser (Win x64).",
5-
"version": "2.2.0-128.4.9",
5+
"version": "2.2.1-129.0.11",
66
"unity": "2021.2",
77
"author": {
88
"name": "Voltstro",
@@ -17,6 +17,6 @@
1717
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
1818
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
1919
"dependencies": {
20-
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.0-128.4.9"
20+
"dev.voltstro.unitywebbrowser.engine.cef": "2.2.1-129.0.11"
2121
}
2222
}

src/Packages/UnityWebBrowser.Engine.Cef/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dev.voltstro.unitywebbrowser.engine.cef",
33
"displayName": "Unity Web Browser CEF Engine",
44
"description": "CEF engine for Unity Web Browser.",
5-
"version": "2.2.0-128.4.9",
5+
"version": "2.2.1-129.0.11",
66
"unity": "2021.3",
77
"author": {
88
"name": "Voltstro",
@@ -18,6 +18,6 @@
1818
"documentationUrl": "https://projects.voltstro.dev/UnityWebBrowser/latest/articles/user/engines/#cef-engine",
1919
"licensesUrl": "https://github.com/Voltstro-Studios/UnityWebBrowser/blob/master/LICENSE.md",
2020
"dependencies": {
21-
"dev.voltstro.unitywebbrowser": "2.2.0"
21+
"dev.voltstro.unitywebbrowser": "2.2.1"
2222
}
2323
}

src/Packages/UnityWebBrowser/Runtime/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
// You can specify all the values or you can default the Build and Revision Numbers
3535
// by using the '*' as shown below:
3636
// [assembly: AssemblyVersion("1.0.*")]
37-
[assembly: AssemblyVersion("2.2.0")]
38-
[assembly: AssemblyFileVersion("2.2.0")]
37+
[assembly: AssemblyVersion("2.2.1")]
38+
[assembly: AssemblyFileVersion("2.2.1")]
3939

4040
[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Prj")]
4141
[assembly: InternalsVisibleTo("VoltstroStudios.UnityWebBrowser.Editor")]

src/Packages/UnityWebBrowser/Runtime/Core/WebBrowserClient.cs

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,17 @@ public Resolution Resolution
103103
/// Enable or disable the cache
104104
/// </summary>
105105
[Tooltip("Enable or disable the cache")]
106+
[Obsolete("Cache control is no longer used. A cache path will always be used now. To use a incognito/private mode, where no profile-specific data is persisted to disk, set incognitoMode to true.")]
107+
[HideInInspector]
106108
public bool cache = true;
107109

110+
/// <summary>
111+
/// Enable or disable incognito/private mode.
112+
/// When true, no profile-specific data is persisted to disk, but cache is sill used to persist installation-specific data.
113+
/// </summary>
114+
[Tooltip("Enable or disable incognito/private mode. When true, no profile-specific data is persisted to disk, but cache is still used to persist installation-specific data.")]
115+
public bool incognitoMode;
116+
108117
/// <summary>
109118
/// Enable or disable WebRTC
110119
/// </summary>
@@ -200,16 +209,15 @@ public Resolution Resolution
200209
/// <summary>
201210
/// The path that UWB engine will log to
202211
/// </summary>
203-
/// <exception cref="UwbIsConnectedException"></exception>
204-
/// <exception cref="ArgumentNullException"></exception>
212+
/// <exception cref="UwbHasInitializedException">Thrown if value is attempted to be changed once UWB has already initialized</exception>
213+
/// <exception cref="ArgumentNullException">Thrown is value provide is null</exception>
205214
public FileInfo LogPath
206215
{
207216
get => logPath;
208217
set
209218
{
210-
if (IsConnected)
211-
throw new UwbIsConnectedException(
212-
"You cannot change the log path once the browser engine is connected");
219+
if (HasInitialized)
220+
throw new UwbHasInitializedException("You cannot change the log path once UWB has initialized!");
213221

214222
logPath = value ?? throw new ArgumentNullException(nameof(value));
215223
}
@@ -224,20 +232,15 @@ public FileInfo LogPath
224232
/// <summary>
225233
/// The path to the cache
226234
/// </summary>
227-
/// <exception cref="UwbIsConnectedException"></exception>
228-
/// <exception cref="ArgumentException"></exception>
229-
/// <exception cref="ArgumentNullException"></exception>
235+
/// <exception cref="UwbHasInitializedException">Thrown if value is attempted to be changed once UWB has already initialized</exception>
236+
/// <exception cref="ArgumentNullException">Thrown is value provide is null</exception>
230237
public FileInfo CachePath
231238
{
232239
get => cachePath;
233240
set
234241
{
235-
if (IsConnected)
236-
throw new UwbIsConnectedException(
237-
"You cannot change the cache path once the browser engine is connected");
238-
239-
if (!cache)
240-
throw new ArgumentException("The cache is disabled!");
242+
if (HasInitialized)
243+
throw new UwbHasInitializedException("You cannot change the cache path once UWB has initialized!");
241244

242245
cachePath = value ?? throw new ArgumentNullException(nameof(value));
243246
}
@@ -334,7 +337,7 @@ internal void Init()
334337
argsBuilder.AppendArgument("background-color", WebBrowserUtils.ColorToHex(backgroundColor));
335338

336339
//Logging
337-
LogPath ??= new FileInfo($"{browserEngineMainDir}/{engine.GetEngineExecutableName()}.log");
340+
LogPath ??= new FileInfo(Path.Combine(browserEngineMainDir, $"{Path.GetFileNameWithoutExtension(engine.GetEngineExecutableName())}.log"));
338341
argsBuilder.AppendArgument("log-path", LogPath.FullName, true);
339342
argsBuilder.AppendArgument("log-severity", logSeverity);
340343

@@ -350,12 +353,11 @@ internal void Init()
350353
argsBuilder.AppendArgument("in-location", inLocation, true);
351354
argsBuilder.AppendArgument("out-location", outLocation, true);
352355

353-
//If we have a cache, set the cache path
354-
if (cache)
355-
{
356-
cachePath ??= new FileInfo($"{browserEngineMainDir}/UWBCache");
357-
argsBuilder.AppendArgument("cache-path", cachePath.FullName, true);
358-
}
356+
//Set cache path
357+
cachePath ??= new FileInfo(Path.Combine(browserEngineMainDir, "UWBCache"));
358+
argsBuilder.AppendArgument("cache-path", cachePath.FullName, true);
359+
360+
argsBuilder.AppendArgument("incognito-mode", incognitoMode);
359361

360362
//Popups
361363
argsBuilder.AppendArgument("popup-action", popupAction, true);
@@ -374,12 +376,15 @@ internal void Init()
374376
}
375377

376378
//Setup proxy
377-
argsBuilder.AppendArgument("proxy-server", proxySettings.ProxyServer);
378-
if (!string.IsNullOrWhiteSpace(proxySettings.Username))
379-
argsBuilder.AppendArgument("proxy-username", proxySettings.Username, true);
379+
if (proxySettings.ProxyServer)
380+
{
381+
argsBuilder.AppendArgument("proxy-server", true);
382+
if (!string.IsNullOrWhiteSpace(proxySettings.Username))
383+
argsBuilder.AppendArgument("proxy-username", proxySettings.Username, true);
380384

381-
if (!string.IsNullOrWhiteSpace(proxySettings.Password))
382-
argsBuilder.AppendArgument("proxy-password", proxySettings.Password, true);
385+
if (!string.IsNullOrWhiteSpace(proxySettings.Password))
386+
argsBuilder.AppendArgument("proxy-password", proxySettings.Password, true);
387+
}
383388

384389
//Make sure not to include this, its for testing
385390
#if UWB_ENGINE_PRJ //Define for backup, cause I am dumb as fuck and gonna accidentally include this in a release build one day

0 commit comments

Comments
 (0)