Clean up comment formatting in GameObjectSerializer

main
Scriptwonder 2025-07-25 02:26:24 -04:00
parent 47bb2c6363
commit 68efdf1bfe
1 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ namespace UnityMcpBridge.Editor.Helpers
/// <summary> /// <summary>
/// Handles serialization of GameObjects and Components for MCP responses. /// Handles serialization of GameObjects and Components for MCP responses.
/// Includes reflection helpers and caching for performance. /// Includes reflection helpers and caching for performance.
/// </summary> tew /// </summary>
public static class GameObjectSerializer public static class GameObjectSerializer
{ {
// --- Data Serialization --- // --- Data Serialization ---
@ -422,7 +422,7 @@ namespace UnityMcpBridge.Editor.Helpers
catch (Exception e) catch (Exception e)
{ {
// Catch potential errors during JToken conversion or addition to dictionary // Catch potential errors during JToken conversion or addition to dictionary
// Debug.LogWarning($"[AddSerializableValue] Error processing value for '{name}' (Type: {type.FullName}): {e.Message}. Skipping."); Debug.LogWarning($"[AddSerializableValue] Error processing value for '{name}' (Type: {type.FullName}): {e.Message}. Skipping.");
} }
} }
@ -505,7 +505,7 @@ namespace UnityMcpBridge.Editor.Helpers
// Helper to create JToken using the output serializer // Helper to create JToken using the output serializer
private static JToken CreateTokenFromValue(object value, Type type) private static JToken CreateTokenFromValue(object value, Type type)
{ {
if (value == null) return JValue.CreateNull(); if (value == null) return JValue.CreateNull();
try try
{ {
@ -514,12 +514,12 @@ namespace UnityMcpBridge.Editor.Helpers
} }
catch (JsonSerializationException e) catch (JsonSerializationException e)
{ {
// Debug.LogWarning($"[GameObjectSerializer] Newtonsoft.Json Error serializing value of type {type.FullName}: {e.Message}. Skipping property/field."); Debug.LogWarning($"[GameObjectSerializer] Newtonsoft.Json Error serializing value of type {type.FullName}: {e.Message}. Skipping property/field.");
return null; // Indicate serialization failure return null; // Indicate serialization failure
} }
catch (Exception e) // Catch other unexpected errors catch (Exception e) // Catch other unexpected errors
{ {
// Debug.LogWarning($"[GameObjectSerializer] Unexpected error serializing value of type {type.FullName}: {e}. Skipping property/field."); Debug.LogWarning($"[GameObjectSerializer] Unexpected error serializing value of type {type.FullName}: {e}. Skipping property/field.");
return null; // Indicate serialization failure return null; // Indicate serialization failure
} }
} }