Skip to content

Commit

Permalink
Update classdata.tpk & README
Browse files Browse the repository at this point in the history
- Replace built-in UnityWebData utility with UnityWebTools.NET library

Signed-off-by: Bayu Satiyo <itsyuukunz@gmail.com>
  • Loading branch information
kiraio-moe committed Nov 29, 2023
1 parent 120ee19 commit ed65fcf
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 434 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,15 @@

On the latest updated policy for Unity Runtime Fee on 22 September 2023 (<https://unity.com/pricing-updates>), one of the key updates is Unity has decided to make the splash screen optional. Starting with Unity 2024 LTS (currently referred to as the 2023 LTS) or later.

> ...and we will remove the requirement to use the Made with Unity splash screen (starting with the LTS version releasing in 2024, currently referred to as the 2023 LTS, or later).
If you developing a new game, you may want to switch to those Unity version.

## Overview

The Unity Splash Screen Remover (USSR) is a Command-Line Interface (CLI) tool designed to remove the Unity splash screen logo & [watermark](https://forum.unity.com/threads/i-am-using-personal-but-there-is-trial-version-water-mark-after-build.591610/#post-3975343) from Unity-built games.

The tool is an implementation of the guide available at <https://github.com/kiraio-moe/remove-unity-splash-screen>. By utilizing this tool, you can easily remove Unity splash screen logo from your games and keep your own logo displayed.
The tool is an implementation of the guide available at <https://github.com/kiraio-moe/remove-unity-splash-screen>. By utilizing this tool, you can easily remove Unity splash screen from your games and keep your own logo displayed.

## Requirements

- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0 ".NET 6.0 SDK") or [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0 ".NET 7.0 SDK")
- [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0 ".NET 6.0 SDK") or [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0 ".NET 7.0 SDK") or [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0 ".NET 8.0 SDK")
- Splash screen `Draw Mode` have been set to `All Sequential` in `Player Settings`.

## Usages
Expand All @@ -52,7 +48,7 @@ The tool is an implementation of the guide available at <https://github.com/kira
> You can find the nightly build of USSR with the latest bug fixes in the [latest runned workflow](https://github.com/kiraio-moe/USSR/actions/workflows/build.yml) artifacts.
- Download USSR from [Releases](https://github.com/kiraio-moe/USSR/releases) page.
- Run `USSR.exe` and follow the instructions.
- Run `USSR.exe` and follow the instructions. If you're on Android or iOS platform, please read the guide below.

### Android

Expand All @@ -71,7 +67,7 @@ The tool is an implementation of the guide available at <https://github.com/kira
### iOS

> [!WARNING]
> This section may have some incorrect information. Feel free to create Issue/Pull Request if there's mistake.
> This section may have some incorrect information (I'm not an expert on this). Feel free to create Issue/Pull Request if there's mistake.
- [Xcode](https://developer.apple.com/xcode/ "Xcode") installed.
- There's no fancy settings to be checked, just **Build** (export) the project.
Expand All @@ -92,18 +88,19 @@ USSR support the following platforms:
## Supported Unity Versions

> [!IMPORTANT]
> Some minor Unity versions is not supported and can caused crash.
> Some minor Unity versions are not supported and can caused crash.
- Unity 5 ~ Unity 2023

## Contribute

If you found any bugs or have suggestions, feel free to make an Issue/Pull Request.
If you found any bugs or have suggestions, feel free to create an Issue/Pull Request.

## Credits

- Special thanks to [@nesrak1](https://github.com/nesrak1) for the [@nesrak1/AssetsTools.NET](https://github.com/nesrak1/AssetsTools.NET) library, which was instrumental in the development of this tool.
- [@arti4ikmin](https://github.com/arti4ikmin) for the guide on Android platform.
- [UnityWebTools.NET](https://github.com/kiraio-moe/UnityWebTools.NET), my own tool to unpack & repack UnityWebData.

## License

Expand Down
40 changes: 19 additions & 21 deletions USSR.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Reflection;
using AssetsTools.NET;
using AssetsTools.NET.Extra;
using Kiraio.UnityWebTools;
using NativeFileDialogSharp;
using Spectre.Console;
using USSR.Utilities;
Expand Down Expand Up @@ -209,6 +210,7 @@ static void Main(string[] args)
AnsiConsole.MarkupLine("( INFO ) [green]UnityWebData[/] file selected.");
isWebGL = true;
webDataFile = selectedFile;
webGLCompressionType = WebGLCompressionType.None;
}
else if (
Utility.ValidateFile(selectedFile, unityBrotliMagic)
Expand Down Expand Up @@ -253,7 +255,7 @@ static void Main(string[] args)
if (isWebGL)
{
// Unpack WebData asset + add to temporary files
unpackedWebDataDirectory = UnityWebDataHelper.UnpackWebDataToFile(webDataFile);
unpackedWebDataDirectory = UnityWebTool.Unpack(webDataFile);

// Find and select "data.unity3d" or "globalgamemanagers"
inspectedFile = Utility.FindRequiredAsset(unpackedWebDataDirectory);
Expand Down Expand Up @@ -348,38 +350,36 @@ static void Main(string[] args)
{
if (isWebGL && assetsReplacer != null)
{
if (webGLCompressionType != WebGLCompressionType.None)
UnityWebDataHelper.PackFilesToWebData(
unpackedWebDataDirectory,
webDataFile
);

switch (webGLCompressionType)
{
case WebGLCompressionType.Brotli:
UnityWebTool.Pack(unpackedWebDataDirectory, webDataFile);

AnsiConsole.MarkupLineInterpolated(
$"( INFO ) Compressing [green]{webDataFile}[/] using Brotli compression. Please be patient, it might take some time..."
);
BrotliUtils.CompressFile(webDataFile, selectedFile);
// BrotliUtils.WriteUnityIdentifier(selectedFile, unityBrotliMagic);

if (File.Exists(webDataFile))
File.Delete(webDataFile);
break;
case WebGLCompressionType.GZip:
UnityWebTool.Pack(unpackedWebDataDirectory, webDataFile);

AnsiConsole.MarkupLineInterpolated(
$"( INFO ) Compressing [green]{webDataFile}[/] using GZip compression. Please be patient, it might take some time..."
);
GZipUtils.CompressFile(webDataFile, selectedFile);

if (File.Exists(webDataFile))
File.Delete(webDataFile);
break;
case WebGLCompressionType.None:
default:
UnityWebDataHelper.PackFilesToWebData(
unpackedWebDataDirectory,
selectedFile
);
UnityWebTool.Pack(unpackedWebDataDirectory, selectedFile);
break;
}

if (webGLCompressionType != WebGLCompressionType.None)
File.Delete(webDataFile);
}
}
catch (Exception ex)
Expand Down Expand Up @@ -677,13 +677,11 @@ out splashScreenIndex
buildSettingsBase["hasPROVersion"].AsBool = !hasProVersion; // true
playerSettingsBase["m_ShowUnitySplashLogo"].AsBool = !showUnityLogo; // false

if (totalSplashScreen > 0)
{
AnsiConsole.MarkupLineInterpolated(
$"( INFO ) [green]Removed splash screen at index {splashScreenIndex}.[/]"
);
splashScreenLogos?.Children.RemoveAt(splashScreenIndex);
}
AnsiConsole.MarkupLineInterpolated(
$"( INFO ) [green]Removed splash screen at index {splashScreenIndex}.[/]"
);

splashScreenLogos?.Children.RemoveAt(splashScreenIndex);

return new()
{
Expand Down
146 changes: 0 additions & 146 deletions UnityWebData.cs

This file was deleted.

Loading

0 comments on commit ed65fcf

Please sign in to comment.