This is not possible to be called for standalone input. Please check your platform and code where this is called (C#)

Hi
i have this error when i press any button UiControls (not working)
thanks all

Exception: This is not possible to be called for standalone input. Please check your platform and code where this is called

You use the CrossPlatformInput StandardAssets package. This package adds a new menu item to your Unity editor called “Mobile Input”. There you have to make sure you select “Enable”. This will add a compiler directive to all Mobile build settings (specifically “MOBILE_INPUT”). This directive will make the CrossPlatformInput controller to use the Mobile implementation.

97217-enablemobileinput.png

The relevant code is in the static constructor of the CrossPlatformInputManager class:

static CrossPlatformInputManager()
{
    s_TouchInput = new MobileInput();
    s_HardwareInput = new StandaloneInput();
#if MOBILE_INPUT
    activeInput = s_TouchInput;
#else
    activeInput = s_HardwareInput;
#endif
}

The “StandaloneInput” class does not support setting the state of an axis or button as it directly used Unity’s Input class. The MobileInput class on the other hand uses virtual input axis which can be driven by buttons.

edit
If for some reason you don’t have that menu item (which would be the case when you did not import the editor scripts from that CrossPlatformInput package), you can add the compiler symbol yourself in the build settings. Just go to File → Build Settings and make sure you have selected a mobile platform as target. Then click “Player Settings” at the bottom. In the inspector under “Other Settings” you will find the “Scripting Define Symbols”.

97218-mobile-input-define.png

Keep in mind that multiple symbols need to be seperated with a semicolon ( ; ) as seen in this screenshot.

Um… sorry to sound so obvios. but have you gone to file/build setting and make sure you have the proper platform selected? if you are building for mobile or webplayer, Maybe you are accidentally set for a Windows build?