Skip to content

[Bug]: Compile error when Physics module is disabled (regression in 9.7.1) #1172

@Ommand

Description

@Ommand

What happened?

After upgrading from 9.6.8 to 9.7.1, the project fails to compile with:

Library/PackageCache/com.coplaydev.unity-mcp@78ee541841/Runtime/Helpers/UnityPhysicsCompat.cs(101,47):
error CS1069: The type name 'Physics' could not be found in the namespace 'UnityEngine'.
This type has been forwarded to assembly 'UnityEngine.PhysicsModule'.
Enable the built in package 'Physics' in the Package Manager window to fix this error.

This error also appears on lines 157 and 172 of the same file.

Reproduction steps

The problem appears right after the package import

Unity version

2022.3.62f2

MCP for Unity package version

9.7.1

Python server version

No response

MCP client

Claude Desktop

Transport

HTTP (default)

OS

macOS

Relevant logs / console output


Checks

  • I searched existing issues and did not find a duplicate
  • I included logs / steps to reproduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions