Skip to content

Commit 46d7271

Browse files
committed
Update ManageGameObject.cs
Update with added comments
1 parent 37db670 commit 46d7271

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

UnityMcpBridge/Editor/Tools/ManageGameObject.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,7 @@ private static bool SetNestedProperty(object target, string path, JToken value,
17931793
/// </summary>
17941794
private static string[] SplitPropertyPath(string path)
17951795
{
1796+
// Handle complex paths with both dots and array indexers
17961797
List<string> parts = new List<string>();
17971798
int startIndex = 0;
17981799
bool inBrackets = false;
@@ -1811,6 +1812,7 @@ private static string[] SplitPropertyPath(string path)
18111812
}
18121813
else if (c == '.' && !inBrackets)
18131814
{
1815+
// Found a dot separator outside of brackets
18141816
parts.Add(path.Substring(startIndex, i - startIndex));
18151817
startIndex = i + 1;
18161818
}

0 commit comments

Comments
 (0)