From 82014e679a248ef9a402675419c9d181cd3d09b3 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 14 Jan 2024 15:52:53 +0900 Subject: [PATCH 1/4] feat: improve compatibility with VRCFury (#122) * fix: broken check for av3emu hooks being enabled * fix: improve VRCF compatibility by adjusting hook execution order * chore: update changelog --- CHANGELOG.md | 1 + Editor/VRChat/BuildFrameworkPreprocessHook.cs | 3 ++- Runtime/ApplyOnPlayGlobalActivator.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd0e980b..e936d448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed ### Changed +- Adjusted hook processing order to improve compatibility with VRCFury (#122) ### Removed diff --git a/Editor/VRChat/BuildFrameworkPreprocessHook.cs b/Editor/VRChat/BuildFrameworkPreprocessHook.cs index 47cff097..9cf2a68b 100644 --- a/Editor/VRChat/BuildFrameworkPreprocessHook.cs +++ b/Editor/VRChat/BuildFrameworkPreprocessHook.cs @@ -22,7 +22,8 @@ internal class ContextHolder : MonoBehaviour internal class BuildFrameworkPreprocessHook : IVRCSDKPreprocessAvatarCallback { - public int callbackOrder => -5000; + // Must run before -10000 (VRCFury) + public int callbackOrder => -11000; public bool OnPreprocessAvatar(GameObject avatarGameObject) { diff --git a/Runtime/ApplyOnPlayGlobalActivator.cs b/Runtime/ApplyOnPlayGlobalActivator.cs index b7d0a044..9a148e41 100644 --- a/Runtime/ApplyOnPlayGlobalActivator.cs +++ b/Runtime/ApplyOnPlayGlobalActivator.cs @@ -22,7 +22,7 @@ internal static bool IsAv3EmuActive() foreach (var root in scene.GetRootGameObjects()) foreach (var emulator in root.GetComponentsInChildren()) { - if (emulator.isActiveAndEnabled && emulator.RunPreprocessAvatarHook) + if (emulator.enabled && emulator.gameObject.activeInHierarchy && emulator.RunPreprocessAvatarHook) { return true; } From 5a2c6241df8762f679745f8fd07c8f9f04a38a85 Mon Sep 17 00:00:00 2001 From: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> Date: Sun, 14 Jan 2024 15:53:13 +0900 Subject: [PATCH 2/4] fix(docs): "Optimization" phase to "Optimizing" phase (#120) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40a8b485..1a855ce9 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Passes are grouped into execution phases, which execute in the following order: * Resolving - This is intended to run before any editor extensions modify the avatar, and is useful for rehydrating components with serialized state that need to refer to the pre-transformation avatar (e.g. if you have a path serialized to a string which you need to resolve to an object before objects start moving around) * Generating - This is intended to run before editor extensions which primarily generate new objects and components for use by other systems. * Transforming - This is intended as the "general-purpose" execution phase, where most extensions which transform avatars run. -* Optimization - This is intended as an execution phase for optimization plugins which aren't intended to modify the avatar in a semantically-meaningful way. +* Optimizing - This is intended as an execution phase for optimization plugins which aren't intended to modify the avatar in a semantically-meaningful way. Within each phase, passes are always executed in the order in which they are declared in the plugin definition. However, depending on dependency declarations, passes from other plugins can be injected between your passes. From 37d6541f659310cdede40fe99179a18bf20828b1 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 14 Jan 2024 15:54:24 +0900 Subject: [PATCH 3/4] 1.3.0-rc.3 --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e936d448..fd47f27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [1.3.0-rc.3] - [2024-01-14] + +### Changed +- Adjusted hook processing order to improve compatibility with VRCFury (#122) + ## [1.3.0-rc.2] - [2024-01-07] ### Added diff --git a/package.json b/package.json index 7fb9ecaf..df8a6b80 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nadena.dev.ndmf", "displayName": "Non-Destructive Modular Framework", - "version": "1.3.0-rc.2", + "version": "1.3.0-rc.3", "unity": "2019.4", "description": "A framework for building non-destructive plugins for VRChat Avatar 3.0", "vrchatVersion": "2022.1.1", From 0e3ca7ff75d0d28381c4342af56f1a7a3971402f Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 14 Jan 2024 16:57:59 +0900 Subject: [PATCH 4/4] fix: normalize default language capitalization (#124) Fixes: #123 --- CHANGELOG.md | 1 + Editor/UI/Localization/Localizer.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd47f27b..e13a1b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Fixed +- Normalize the representation of the "default language" locale (#124) ### Changed - Adjusted hook processing order to improve compatibility with VRCFury (#122) diff --git a/Editor/UI/Localization/Localizer.cs b/Editor/UI/Localization/Localizer.cs index ea36e265..d92e1b17 100644 --- a/Editor/UI/Localization/Localizer.cs +++ b/Editor/UI/Localization/Localizer.cs @@ -40,7 +40,7 @@ public sealed class Localizer /// public Localizer(string defaultLanguage, Func)>> loader) { - DefaultLanguage = defaultLanguage; + DefaultLanguage = CultureInfo.GetCultureInfo(defaultLanguage).Name; LanguagePrefs.RegisterLanguage(defaultLanguage); _localizationLoader = loader;