Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 8ed1576

Browse files
committed
fix
1 parent acd11d8 commit 8ed1576

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Assets/GameFramework/Node/NodeManager.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ public void Set<T>(string key, T value)
2828
{
2929
NodeDataBase nodeDataBase;
3030
int hashCode = typeof(T).GetHashCode();
31-
if (!_allNodeDatas.TryGetValue(hashCode, out nodeDataBase))
32-
nodeDataBase = new NodeData<T>();
31+
if (!_allNodeDatas.TryGetValue(hashCode, out nodeDataBase))
32+
{
33+
nodeDataBase = new NodeData<T>();
34+
_allNodeDatas[hashCode] = nodeDataBase;
35+
}
3336
NodeData<T> nodeData = nodeDataBase as NodeData<T>;
3437
nodeData.Set(key, value);
3538
}

0 commit comments

Comments
 (0)