fix: replace Editor-only McpLog with Debug.LogWarning in Runtime assembly (#535)

- UnityTypeConverters.cs referenced McpLog (Editor-only) from Runtime asmdef
- This caused CS0103 build errors in player builds
- Replaced with UnityEngine.Debug.LogWarning for runtime compatibility

Also cleaned up test file:
- Removed stale NL test artifacts (Build marker, Tail test comments)
- Removed unused local functions causing CS8321 warnings
main
dsarno 2026-01-08 07:59:05 -08:00 committed by GitHub
parent bf6603d89e
commit 7d58053f87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 16 deletions

View File

@ -341,7 +341,7 @@ namespace MCPForUnity.Runtime.Serialization
#else #else
// Runtime deserialization is tricky without AssetDatabase/EditorUtility // Runtime deserialization is tricky without AssetDatabase/EditorUtility
// Maybe log a warning and return null or existingValue? // Maybe log a warning and return null or existingValue?
McpLog.Warn("UnityEngineObjectConverter cannot deserialize complex objects in non-Editor mode."); UnityEngine.Debug.LogWarning("UnityEngineObjectConverter cannot deserialize complex objects in non-Editor mode.");
// Skip the token to avoid breaking the reader // Skip the token to avoid breaking the reader
if (reader.TokenType == JsonToken.StartObject) JObject.Load(reader); if (reader.TokenType == JsonToken.StartObject) JObject.Load(reader);
else if (reader.TokenType == JsonToken.String) reader.ReadAsString(); else if (reader.TokenType == JsonToken.String) reader.ReadAsString();

View File

@ -68,8 +68,6 @@ public class LongUnityScriptClaudeTest : MonoBehaviour
} }
} }
// NL tests sometimes add comments above Update() as an anchor
// Build marker OK
private void Update() private void Update()
{ {
if (reachOrigin == null) return; if (reachOrigin == null) return;
@ -757,19 +755,6 @@ private void ApplyBlend(Vector3 blend) // safe animation
} }
private void Pad0240() private void Pad0240()
{ {
// Tail test A
// Tail test B
// Tail test C
// idempotency test marker
void TestHelper() { /* placeholder */ }
void IncrementCounter() { padAccumulator++; }
// end of test modifications
// path test marker A
} }
private void Pad0241() private void Pad0241()
{ {