Skip to content

error McpLog in not Editor codes #533

Closed

Description

@SungwookJi

Editor\Helpers\McpLog.cs is Editor Assembly

but this code is something wrong

UnityTypeConverters.cs

#if UNITY_EDITOR
...
#else
// Runtime deserialization is tricky without AssetDatabase/EditorUtility
// Maybe log a warning and return null or existingValue?
McpLog.Warn("UnityEngineObjectConverter cannot deserialize complex objects in non-Editor mode.");
#endif

Activity

  1. MirceaMatei-Superplay commented on Jan 8, 2026

    @MirceaMatei-Superplay

    I've also encountered this issue. The problem is that this line is currently Editor-only logging used from the Runtime asmdef, which breaks player builds.
    Problem: McpLog lives under Editor/Helpers/McpLog.cs (Editor assembly), but it’s referenced from Runtime/Serialization/UnityTypeConverters.cs (Runtime assembly). This produces:
    CS0103: The name 'McpLog' does not exist in the current context
    Suggested fix (minimal): replace McpLog.Warn(...) with Unity runtime logging:
    UnityEngine.Debug.LogWarning("UnityEngineObjectConverter cannot deserialize complex objects in non-Editor mode.");
    Alternative fix (if intended Editor-only package): update Runtime/MCPForUnity.Runtime.asmdef to prevent Runtime from compiling into player builds:
    "includePlatforms": ["Editor"],"autoReferenced": false

  2. dsarno commented on Jan 8, 2026

    @dsarno
    Collaborator

    @MirceaMatei-Superplay @SungwookJi This should be fixed in latest 9.0.3 -- please try to pull most recent version and see if everything works. Thanks for the heads-up.

  3. added
    bug
    on Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions