Skip to content

Commit 3508fd6

Browse files
committed
code review fix
- move generate binding id to be before the other two binding id funcitons, as its comment explains why you need the id
1 parent aa26101 commit 3508fd6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

com.unity.formats.fbx/Editor/Sources/Recorders/FbxRecorder/FbxRecorderSettings.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ public Transform TransferAnimationDest
7373
}
7474
}
7575

76+
/// <summary>
77+
/// Get a binding ID for the transform, so that the reference survives domain reload. Maintaining a direct reference would not work
78+
/// as all scene objects are destroyed and recreated on reload (e.g. when entering/exiting playmode).
79+
/// </summary>
80+
/// <returns>Binding ID</returns>
81+
static string GenerateBindingId()
82+
{
83+
return GUID.Generate().ToString();
84+
}
85+
7686
/// <summary>
7787
/// Get the Unity object (in this case transform), associated with the given binding ID.
7888
/// </summary>
@@ -99,16 +109,6 @@ static void SetBinding(string id, UnityEngine.Object obj)
99109
method.Invoke(null, new object[] { id, obj });
100110
}
101111

102-
/// <summary>
103-
/// Get a binding ID for the transform, so that the reference survives domain reload. Maintaining a direct reference would not work
104-
/// as all scene objects are destroyed and recreated on reload (e.g. when entering/exiting playmode).
105-
/// </summary>
106-
/// <returns>Binding ID</returns>
107-
static string GenerateBindingId()
108-
{
109-
return GUID.Generate().ToString();
110-
}
111-
112112
/// <summary>
113113
/// Determines whether p is an ancestor to t.
114114
/// </summary>

0 commit comments

Comments
 (0)