Skip to content

Commit aee0177

Browse files
committed
Some tweaks
1 parent 4ff54ec commit aee0177

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

DynamicVariablePowerTools/DebugInfoGenerator.cs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using FrooxEngine;
77
using MonkeyLoader.Resonite;
88
using MonkeyLoader.Resonite.UI;
9+
using MonkeyLoader.Resonite.UI.Inspectors;
910

1011
namespace DynamicVariablePowerTools
1112
{
@@ -57,21 +58,28 @@ private static void OutputComponentHierarchy(DynamicVariableSpace space, Sync<st
5758

5859
private static void OutputLinkedVariables(DynamicVariableSpace space, Sync<string> target)
5960
{
60-
var names = new StringBuilder($"Variables linked to Namespace [{space.SpaceName}] on {space.Slot.Name}");
61-
names.Append(space.SpaceName);
62-
names.AppendLine(":");
63-
64-
foreach (var identity in space._dynamicValues.Keys)
61+
space.StartTask(async () =>
6562
{
66-
names.Append(identity.name);
67-
names.Append(" (");
68-
names.AppendTypeName(identity.type);
69-
names.AppendLine(")");
70-
}
63+
await default(ToBackground);
64+
65+
var names = new StringBuilder($"Variables linked to Namespace [{space.SpaceName}] on {space.Slot.Name}");
66+
names.Append(space.SpaceName);
67+
names.AppendLine(":");
7168

72-
names.Remove(names.Length - Environment.NewLine.Length, Environment.NewLine.Length);
69+
foreach (var identity in space._dynamicValues.Keys)
70+
{
71+
names.Append(identity.name);
72+
names.Append(" (");
73+
names.AppendTypeName(identity.type);
74+
names.AppendLine(")");
75+
}
7376

74-
target.Value = names.ToString();
77+
names.Remove(names.Length - Environment.NewLine.Length, Environment.NewLine.Length);
78+
79+
await default(ToWorld);
80+
81+
target.Value = names.ToString();
82+
});
7583
}
7684
}
7785
}

DynamicVariablePowerTools/DynamicVariablePowerTools.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="MonkeyLoader.GamePacks.Resonite" Version="0.21.2-beta" />
32+
<PackageReference Include="MonkeyLoader.GamePacks.Resonite" Version="0.22.0-beta" />
3333
<PackageReference Include="PolySharp" Version="1.15.0">
3434
<PrivateAssets>all</PrivateAssets>
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>
3737
<PackageReference Include="Resonite.Elements.Core" Version="1.4.3" />
3838
<PackageReference Include="Resonite.Elements.Quantity" Version="1.2.3" />
39-
<PackageReference Include="Resonite.FrooxEngine" Version="2025.1.12.1412" />
40-
<PackageReference Include="Resonite.ProtoFluxBindings" Version="2025.3.9.1412" />
39+
<PackageReference Include="Resonite.FrooxEngine" Version="2025.1.17.6" />
40+
<PackageReference Include="Resonite.ProtoFluxBindings" Version="2025.3.14.7" />
4141
</ItemGroup>
4242
</Project>

DynamicVariablePowerTools/RenameDirectlyLinkedVariables.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ private static void Prefix(DynamicVariableSpace __instance, string ____lastName,
2929
__instance.Slot.ForeachComponentInChildren<IDynamicVariable>(dynVar =>
3030
{
3131
DynamicVariableHelper.ParsePath(dynVar.VariableName, out var spaceName, out var variableName);
32+
3233
if (spaceName == null || Traverse.Create(dynVar).Field("handler").Field("_currentSpace").GetValue() != __instance)
3334
return;
3435

@@ -42,7 +43,7 @@ private static void Prefix(DynamicVariableSpace __instance, string ____lastName,
4243
return;
4344
}
4445

45-
if ((dynVar as ProtoFluxEngineProxy).Node.Target is IProtoFluxNode dynVarNode
46+
if (dynVar is ProtoFluxEngineProxy { Node.Target: IProtoFluxNode dynVarNode }
4647
&& dynVarNode.TryGetField("VariableName") is SyncRef<IGlobalValueProxy<string>> nameProxyRef
4748
&& nameProxyRef.Target is GlobalValue<string> nameProxy)
4849
{

0 commit comments

Comments
 (0)