Search Unity

Error with importing Standard Assets

Discussion in 'Documentation' started by Gruntxx, Mar 10, 2019.

  1. Gruntxx

    Gruntxx

    Joined:
    May 18, 2018
    Posts:
    2
    Hey
    I'd like to start a 2D game. I watched a tutorial and I was told Ineed to import Standard Assets. Now, when I have imported it, I get an error message (more than one, but they disappear).

    Assets\Standard Assets\2D\Scripts\Platformer2DUserControl.cs(2,25): error CS0234: The type or namespace name 'CrossPlatformInput' does not exist in the namespace 'UnitySampleAssets' (are you missing an assembly reference?)

    How can I fix it?
     
  2. 40detectives

    40detectives

    Joined:
    Apr 9, 2016
    Posts:
    74
    Make sure you checked all ticks for the CrossPlatformInput, some of the Standard Asset you've imported are telling you they need to import CrossPlatformInput also to work.

    Look at my screenshot. You probably only need the .cs file checked at the end, as the others are prefabs of controllers for other devices.

    PS.:This is from the 2018.1, if you have 2018.2, 2018.3, or later the interface may be different, but you just have to check those.
     

    Attached Files: