Skip to content

Commit c486f8b

Browse files
E1intBanane9
authored andcommitted
Add update order workaround for MemberEditors
This implements the suggested workaround for Yellow-Dog-Man/Resonite-Issues#4431
1 parent 574b0bf commit c486f8b

5 files changed

Lines changed: 30 additions & 1 deletion

File tree

CommunityBugFixCollection/Contributors.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ internal static class Contributors
2222
public static string[] Nytra { get; } = ["Nytra"];
2323

2424
public static string[] Onan { get; } = ["989onan"];
25+
26+
public static string[] yosh { get; } = ["yosh"];
2527
}
2628
}

CommunityBugFixCollection/Locale/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"CommunityBugFixCollection.ImportWebFilesAsUrls.Description": "Sorgt dafür, dass URLs zu Textdateien oder Resonite Packages nicht importiert werden, statt als Hyperlink aufzutauchen.",
3434
"CommunityBugFixCollection.LocalizedByteFormatting.Description": "Lokalisiert die Speichereinheiten (MiB, GiB, etc.), inbsesondere bei der StorageUsageStatus-Komponente. Es gibt eine Einstellung dafür, die Bytes nach IEC (Faktor 1024) statt dezimal (Faktor 1000) zu formatieren.",
3535
"CommunityBugFixCollection.LongerWorldLoadingFailIndication.Description": "Lässt den Welt-Ladefortschritts-Indikator frühestens nach 20s verschwinden, falls der Vorgang fehlgeschlagen ist.",
36+
"CommunityBugFixCollection.MemberEditorUpdateOrder.Description": "Sets die Update Order von MemberEditor-Komponenten in Inspektoren auf den höchsten Wert, um (meistens) einen Frame Verzögerung beim angezeigten Wert zu verhindern.",
3637
"CommunityBugFixCollection.NaNtEqual.Description": "Sorgt dafür, dass NaN float / double Werte sich bei den == und != ProtoFlux Nodes sowie bei der ValueEqualityDriver-Komponente niemals gleichen.",
3738
"CommunityBugFixCollection.NoAudioOutputCrash.Description": "Verhindert, dass die AudioOutput-Komponente ihre Listener aktualisiert nachdem sie entfernt wurde und damit die Session crasht.",
3839
"CommunityBugFixCollection.NoLossOfColorProfile.Description": "Verhindert, dass Farbprofile nicht bei allen Berechnungen erhalten bleiben.",

CommunityBugFixCollection/Locale/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"CommunityBugFixCollection.ConsistentContextMenuAngularSize.Description": "Makes the context menu stay a fixed on-screen size in desktop mode, regardless of FOV.",
2525
"CommunityBugFixCollection.ConstantNodeNameAdjustments.Name": "(Legacy) Constant Node Name Adjustments",
2626
"CommunityBugFixCollection.ConstantNodeNameAdjustments.Description": "(Legacy) Changes the names of the ProtoFlux nodes in Strings > Constants to be how they were with the original fix.",
27-
"CommunityBugFixCollection.CopySyncMemberToClipboardAction.Description": "Adds Copy to Clipboard action on any non-reference member fields in Inspectors.",
27+
"CommunityBugFixCollection.CopySyncMemberToClipboardAction.Description": "Adds Copy to Clipboard action on any non-reference member fields in inspectors.",
2828
"CommunityBugFixCollection.CorrectMaterialGizmoScaling.Description": "Fixes the MaterialGizmo being scaled twice when using Edit on the Material Tool.",
2929
"CommunityBugFixCollection.CorrectOverriddenSpelling.Description": "Corrects the spelling of Overridden on ProtoFlux nodes.",
3030
"CommunityBugFixCollection.DuplicateAndMoveMultipleGrabbedItems.Description": "Fixes references between multiple duplicated or transferred-between-worlds items breaking.",
@@ -39,6 +39,7 @@
3939
"CommunityBugFixCollection.ImportWebFilesAsUrls.Description": "Fixes URLs to text files or Resonite Packages failing to import instead of appearing as a hyperlink.",
4040
"CommunityBugFixCollection.LocalizedByteFormatting.Description": "Localizes the storage units (MiB, GiB, etc.), in particular for the StorageUsageStatus component. There's an option to use IEC format (factor 1024) over decimal (factor 1000).",
4141
"CommunityBugFixCollection.LongerWorldLoadingFailIndication.Description": "Only lets the World Load Progress Indicator disappear after 20s or more if the process failed.",
42+
"CommunityBugFixCollection.MemberEditorUpdateOrder.Description": "Sets the Update Order of MemberEditor components in inspectors to the highest value to (most of the time) prevent a frame delay in the value they show.",
4243
"CommunityBugFixCollection.NaNtEqual.Description": "Makes NaN floats / doubles never equal to each other for the ProtoFlux == and != nodes, as well as the ValueEqualityDriver component.",
4344
"CommunityBugFixCollection.NoAudioOutputCrash.Description": "Prevents the AudioOutput component from updating listeners when it's been removed and crashing the sessions.",
4445
"CommunityBugFixCollection.NoLossOfColorProfile.Description": "Fixes Color Profile not being preserved on all operations.",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using FrooxEngine;
2+
using HarmonyLib;
3+
using MonkeyLoader.Resonite;
4+
5+
// This originally came from yosh (https://git.unix.dog/yosh)
6+
// But I can't find the mod anywhere anymore?
7+
8+
namespace CommunityBugFixCollection
9+
{
10+
[HarmonyPatchCategory(nameof(MemberEditorUpdateOrder))]
11+
[HarmonyPatch(typeof(MemberEditor), nameof(MemberEditor.Setup))]
12+
internal sealed class MemberEditorUpdateOrder : ResoniteMonkey<MemberEditorUpdateOrder>
13+
{
14+
public override IEnumerable<string> Authors => Contributors.yosh;
15+
16+
public override bool CanBeDisabled => true;
17+
18+
private static void Postfix(MemberEditor __instance)
19+
{
20+
if (Enabled)
21+
__instance.UpdateOrder = int.MaxValue;
22+
}
23+
}
24+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ just disable them in the settings in the meantime.
8181
* https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1158
8282
* https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2979
8383
* UIX Rendering issues in UI-Focus mode (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1292)
84+
* Driven values in inspectors usually appear delayed by a frame (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/4431)
8485

8586

8687
## Features

0 commit comments

Comments
 (0)