- Home /
CrossPlatformInput class not within the UnityStandardAssets namespace
My Unity scripts require the cross platform input classes. First they were called in the usual way.
using UnityStandardAssets.CrossPlatformInput;
This worked for a long time. But recently all scripts that had the above statement gave this error.
Assets/Standard Assets/Characters/ThirdPersonCharacter/Scripts/ThirdPersonUserControl.cs(3,27): error CS0234: The type or namespace name `CrossPlatformInput' does not exist in the namespace `UnityStandardAssets'. Are you missing an assembly reference?
Now the project doesn't compile..
I googled and tried importing the scripts and assets again but nothing worked. Further search showed that this CrossPlatformInput class is under 'UnitySampleAssets' and not under 'UnityStandardAssets'.
How can I resolve this error?
Answer by tanoshimi · Aug 09, 2016 at 03:14 PM
"Further search showed that this CrossPlatformInput class is under 'UnitySampleAssets' and not under 'UnityStandardAssets'" So you need to add an assembly reference, like the error message says:
using UnitySampleAssets;
Hello! I am totally new to the Unity environment and I keep getting this error message. When I tried editing the script in the Visual Studio 2015 as you suggested, it says that the UnitySampleAssets assembly reference is missing. How can I add that reference? Or am I doing something wrong here?
I am in the 3D project, creating a basic RPG game. The problem occurred when I performed the operation: Assets -> Import Package -> Cameras. It says that in the FreeLookCam is an error described by the question above you have answered.
I am using Unity 2017.3.0f3.
Thank you in advance.
It's O$$anonymous$$. I've solved it. :D
Sorry for disturbing you.
Answer by ValterJunior · Aug 12, 2017 at 12:23 AM
Depois de vários dias a procura do concerto desse erro, finamente encontrei. Obrigado.