Skip to content

Commit 45c0202

Browse files
committed
packaging: Use UnityObjectId for graph asset identity.
Replace GetInstanceID() with UnityObjectId.Get() when keying graph assets, so identifiers stay stable across reloads. Bump Unity to 6000.5.0f1 and com.unity.visualscripting to 1.9.11.
1 parent cc02eb4 commit 45c0202

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Runtime/Packaging/VisualScriptingGraphPackager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private static VisualScriptingGraphData.GraphAsset PackGraph(ScriptableObject as
190190
{
191191
var serialized = asset.Serialize(true);
192192
return new VisualScriptingGraphData.GraphAsset {
193-
Id = graphIds[asset.GetInstanceID()],
193+
Id = graphIds[VisualPinball.Unity.UnityObjectId.Get(asset)],
194194
TypeName = asset.GetType().FullName,
195195
Name = asset.name,
196196
Json = serialized.json,
@@ -216,7 +216,7 @@ private static List<string> MapObjectReferences(UnityObject[] objectReferences,
216216
}
217217

218218
if (obj is IMacro && obj is ScriptableObject macro) {
219-
var instanceId = macro.GetInstanceID();
219+
var instanceId = VisualPinball.Unity.UnityObjectId.Get(macro);
220220
if (!graphIds.TryGetValue(instanceId, out var id)) {
221221
id = "g" + graphIds.Count;
222222
graphIds[instanceId] = id;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"Script",
1010
"Visual"
1111
],
12-
"unity": "6000.0",
13-
"unityRelease": "37f1",
12+
"unity": "6000.5",
13+
"unityRelease": "0f1",
1414
"dependencies": {
15-
"com.unity.visualscripting": "1.7.7",
15+
"com.unity.visualscripting": "1.9.11",
1616
"org.visualpinball.engine.unity": "0.0.1-preview.90"
1717
},
1818
"author": "freezy <freezy@vpdb.io>",

0 commit comments

Comments
 (0)