Update ManageGameObject.cs

Update with added comments
main
Scriptwonder 2025-07-25 02:32:19 -04:00
parent 37db670427
commit 46d7271e3d
1 changed files with 2 additions and 0 deletions

View File

@ -1793,6 +1793,7 @@ namespace UnityMcpBridge.Editor.Tools
/// </summary> /// </summary>
private static string[] SplitPropertyPath(string path) private static string[] SplitPropertyPath(string path)
{ {
// Handle complex paths with both dots and array indexers
List<string> parts = new List<string>(); List<string> parts = new List<string>();
int startIndex = 0; int startIndex = 0;
bool inBrackets = false; bool inBrackets = false;
@ -1811,6 +1812,7 @@ namespace UnityMcpBridge.Editor.Tools
} }
else if (c == '.' && !inBrackets) else if (c == '.' && !inBrackets)
{ {
// Found a dot separator outside of brackets
parts.Add(path.Substring(startIndex, i - startIndex)); parts.Add(path.Substring(startIndex, i - startIndex));
startIndex = i + 1; startIndex = i + 1;
} }