Skip to content

Commit 5d97c45

Browse files
fix: in-sceneobject networkobject update in editor tool update (up-port-fix) (#3123)
* fix Assign the current NetworkObject prefab to be updated. * style adding comment
1 parent d218b29 commit 5d97c45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public uint PrefabIdHash
106106
internal void RefreshAllPrefabInstances()
107107
{
108108
var instanceGlobalId = GlobalObjectId.GetGlobalObjectIdSlow(this);
109+
// Assign the currently selected instance to be updated
110+
NetworkObjectRefreshTool.PrefabNetworkObject = this;
109111
if (!PrefabUtility.IsPartOfAnyPrefab(this) || instanceGlobalId.identifierType != k_ImportedAssetObjectType)
110112
{
111113
EditorUtility.DisplayDialog("Network Prefab Assets Only", "This action can only be performed on a network prefab asset.", "Ok");

0 commit comments

Comments
 (0)