Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

'Physics' does not exist in the namespace 'Unity'

Discussion in 'Editor & General Support' started by maciejgorski, Sep 7, 2020.

  1. maciejgorski

    maciejgorski

    Joined:
    Oct 7, 2015
    Posts:
    8
    Hi,

    I have general problem that I keep getting error:

    The type or namespace name 'Physics' does not exist in the namespace 'Unity' (are you missing an assembly reference?)

    I am using 2020.1.4f1 Linux version on new 3d project.
    I have added just: using Unity.Physics; and Editor started to complain.

    Does any body faced this problem?
     
    Last edited: Sep 7, 2020
  2. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    506
  3. JusteTools

    JusteTools

    Joined:
    Mar 19, 2021
    Posts:
    14
    Hi! I have the same issue but I do have the package in my project (0.6.0-preview.3)

    Any idea where that could come from? :s

    EDIT: Found a solution the second after I posted this, I went into preferences and regenerated my project file, it worked!
     
  4. Spemble

    Spemble

    Joined:
    Mar 20, 2016
    Posts:
    7
    (also, check your assembly references, like the error says... *facepalm* (r.i.p. past hour of my time))
     
  5. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,869
    You just necroposted on a two-year-old issue. But while we're at it, the Physics symbol is in the UnityEngine namespace, not the Unity namespace, which is likely what the original poster (and other posters) overlooked way back then.
     
    Kurt-Dekker likes this.