-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'release/6.2.0' into openupm
Release 6.2.0
- Loading branch information
Showing
18 changed files
with
292 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. | |
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [6.2.0] - 2024-01-29 | ||
|
||
### Added | ||
- Deprecated soft-dependency packages are detected and a warning with upgrade instructions is shown in the console. | ||
|
||
### Changed | ||
- Support for Draco 3D Data Compression is now provided by [*Draco for Unity* (com.unity.cloud.draco)][DracoForUnity], which is a fork of and replaces [*DracoUnity* (com.atteneder.draco)][DracoUnity]. | ||
|
||
### Fixed | ||
- Compiler error when Newtonsoft JSON package was not installed. | ||
- All Draco vertex attributes are assigned by identifier instead of type. As a result, tangents are now decoded properly instead of recalculated. | ||
- Compilation error when scripting define `GLTFAST_BUILTIN_SHADER_GRAPH` is set. | ||
- `GltfImport.IsTextureYFlipped` returns correct result for non-KTX textures. | ||
|
||
## [6.1.0] - 2024-01-17 | ||
|
||
### Added | ||
|
@@ -1062,6 +1076,7 @@ This release contains multiple breaking changes. Please read the [upgrade guide] | |
[Entities1.0]: https://docs.unity3d.com/Packages/[email protected] | ||
[KtxUnity]: https://github.com/atteneder/KtxUnity | ||
[DanDovi]: https://github.com/DanDovi | ||
[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest | ||
[DracoUnity]: https://github.com/atteneder/DracoUnity | ||
[aurorahcx]: https://github.com/aurorahcx | ||
[Battlehub0x]: https://github.com/Battlehub0x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ Unity forks have been created for *KtxUnity* and *DracoUnity* as well. If you've | |
See their respective upgrade guides | ||
|
||
- Upgrade to [*KTX for Unity*](https://docs.unity3d.com/Packages/[email protected]/manual/upgrade-guide.html) | ||
- Upgrade to *Draco for Unity* (coming soon) | ||
- Upgrade to [*Draco for Unity*](https://docs.unity3d.com/Packages/[email protected]/manual/upgrade-guide.html) | ||
|
||
### Keep using the original glTFast | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#if UNITY_2021_2_OR_NEWER | ||
#define HYPERLINK | ||
#define COMBINED | ||
#endif | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using UnityEditor; | ||
using UnityEditor.PackageManager; | ||
using UnityEditor.PackageManager.Requests; | ||
using UnityEngine; | ||
|
||
namespace GLTFast.Editor | ||
{ | ||
[InitializeOnLoad] | ||
static class PackageSetupCheck | ||
{ | ||
static ListRequest s_ListRequest; | ||
|
||
static PackageReplacement[] s_Packages = new PackageReplacement[] | ||
{ | ||
new PackageReplacement() | ||
{ | ||
name = "Draco for Unity", | ||
identifier = "com.unity.cloud.draco", | ||
legacyName = "Draco 3D Data Compression", | ||
legacyIdentifier = "com.atteneder.draco", | ||
feature = "KHR_draco_mesh_compression", | ||
featureUri = "https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md", | ||
upgradeDocsUri = "https://docs.unity3d.com/Packages/[email protected]/manual/upgrade-guide.html#transition-to-draco-for-unity" | ||
}, | ||
new PackageReplacement() | ||
{ | ||
name = "KTX for Unity", | ||
identifier = "com.unity.cloud.ktx", | ||
legacyName = "KTX/Basis Universal Texture", | ||
legacyIdentifier = "com.atteneder.ktx", | ||
feature = "KHR_texture_basisu", | ||
featureUri = "https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_basisu/README.md", | ||
upgradeDocsUri = "https://docs.unity3d.com/Packages/[email protected]/manual/upgrade-guide.html#transition-to-ktx-for-unity" | ||
} | ||
}; | ||
|
||
static PackageSetupCheck() | ||
{ | ||
EditorApplication.update += WaitForPackageList; | ||
s_ListRequest = Client.List(true); | ||
#if HYPERLINK | ||
EditorGUI.hyperLinkClicked += HyperLinkClicked; | ||
#endif | ||
} | ||
|
||
static void WaitForPackageList() | ||
{ | ||
if (s_ListRequest != null && s_ListRequest.IsCompleted) | ||
{ | ||
if (s_ListRequest.Error == null) | ||
{ | ||
foreach (var package in s_Packages) | ||
{ | ||
CheckForLegacyPackage(s_ListRequest.Result, package); | ||
} | ||
} | ||
|
||
s_ListRequest = null; | ||
EditorApplication.update -= WaitForPackageList; | ||
} | ||
} | ||
|
||
static void CheckForLegacyPackage( | ||
PackageCollection packages, | ||
PackageReplacement pkg | ||
) | ||
{ | ||
var legacyFound = false; | ||
|
||
foreach (var packageInfo in packages) | ||
{ | ||
if (packageInfo.name == pkg.legacyIdentifier) | ||
{ | ||
legacyFound = true; | ||
} | ||
} | ||
if (legacyFound) | ||
{ | ||
pkg.LogUpgradeMessage(); | ||
} | ||
} | ||
|
||
#if HYPERLINK | ||
static void HyperLinkClicked(EditorWindow window, HyperLinkClickedEventArgs args) | ||
{ | ||
if(args.hyperLinkData.TryGetValue("command", out var command) && command=="replace") | ||
{ | ||
if (args.hyperLinkData.TryGetValue("arg", out var pkg)) | ||
{ | ||
foreach (var package in s_Packages) | ||
{ | ||
if (package.legacyIdentifier == pkg) | ||
{ | ||
ReplacePackage(package); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
#endif | ||
|
||
#if COMBINED | ||
static void ReplacePackage(PackageReplacement package) | ||
{ | ||
if (EditorUtility.DisplayDialog( | ||
"Package Upgrade", | ||
$"Replace deprecated {package.legacyName} ({package.legacyIdentifier}) by {package.name} ({package.identifier})?", | ||
"Replace", | ||
"Cancel" | ||
) | ||
) | ||
{ | ||
Client.AddAndRemove( | ||
new[] { package.identifier }, | ||
new[] { package.legacyIdentifier } | ||
); | ||
} | ||
} | ||
#endif | ||
} | ||
|
||
struct PackageReplacement | ||
{ | ||
public string name; | ||
public string identifier; | ||
public string legacyName; | ||
public string legacyIdentifier; | ||
public string feature; | ||
public string featureUri; | ||
public string upgradeDocsUri; | ||
|
||
public void LogUpgradeMessage() | ||
{ | ||
var message = $"Deprecated package <i>{legacyName}</i> (<i>{legacyIdentifier}</i>) detected!\n" + | ||
$"<i>glTFast</i> now requires <i>{name}</i> (<i>{identifier}</i>) instead to provide support for " + | ||
$"<a href=\"{featureUri}\">{feature}</a>.\n"; | ||
#if HYPERLINK | ||
message += | ||
$"You can <a command=\"replace\" arg=\"{legacyIdentifier}\">automatically replace</a> the " + | ||
$"deprecated package or do it manually following the <a href=\"{upgradeDocsUri}\">documentation</a>."; | ||
#else | ||
message += "To upgrade the package, follow the documentation at " + | ||
$"<a href=\"{upgradeDocsUri}\">{upgradeDocsUri}</a>"; | ||
#endif | ||
Debug.LogWarning(message); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.