# How to enable CrossPlatformInput in Unity?

I'm new to Unity but not a complete programming novice.

I'm trying to use the CrossPlatformInput component from the "Car" prefab from Standard Assets.

I can't see it appear and when reading the notes file it says this:

Importing the CrossPlatformInput package adds a menu item to Unity, "CrossPlatformInput", which allows you to enable or disable the CrossPlatformInput in the editor. You must enable the CrossPlatformInput in order to see the control rigs in the editor, and to start using Unity Remote to control your game.

So,

1. What is "a menu item" and where do I find it in the Unity UI?

2. How do I enable CrossPlatformInput? I have dragged the prefab called DualTouchControls into my scene but I can't see anything and I'm not sure how to link it to the actual car object.

• CrossPlatformInput is one of the standard packages you can import. Also the car object probably has scripts that are listening to virtual inputs which are set and enabled externally. If you can compile and run it should work out of the box. You don't need to link anything, that's the whole point. – Sidar Jul 9 '17 at 15:45
• Thanks Sidar. You are right, I was getting confused becoz I tried last night and it didnt show up. But now I remade the projectt and it works with the joystick out the box. Only thing is i now want to switch the button to accellerator, instead of the Y-Axis of the joystick – Big T Larrity Jul 9 '17 at 15:57
• I think you can change that on the components. It's best that you try your own input setup and see how they have done it (also make sure you look at their scripts ). It isn't hard at all and then you can do all sorts of "bindings" the way you want. – Sidar Jul 9 '17 at 16:05
• Do you mean write my own virtual joystick/buttons script, by using info from the class they made? I'm using the prefab Car and it's the CarUserControl script I'm trying to alter, as the joystick and buttons do kick out relevant variable values for the input already (if that makes sense :S ) – Big T Larrity Jul 9 '17 at 16:09
• it wouldnt be very possible for me to completely re-write the car code as it has lots of complex parts about the wheels and steering etc. what I am trying to do is just switch the accelaration from the Y-Axis joystick, to the button. I think i can add some code inside the CarUserControl class to receive the button press and then add some velocity but i am still very stuck right now :\ – Big T Larrity Jul 9 '17 at 16:13

What is "a menu item" and where do I find it in the Unity UI?

You know what the File and Edit menus are and where to find those, yes? The package contains an Editor script which adds a new menu item, like File or Edit, named "Mobile Input" to the menu bar. Use it like you would any other menu.

How do I enable CrossPlatformInput?

I haven't used the package, but I imagine that the thing you need to do is...

enable the CrossPlatformInput [via the Mobile Input menu] in order to see the control rigs in the editor, and to start using Unity Remote

• The documentation is a bit misleading: the menu item is actually called "Mobile Input". So enabling CrossPlatformInput means opening the Mobile Input menu and selecting Enable – DMGregory Jul 9 '17 at 15:25
• aah, was wondering why I couldnt see anything called CrossPlatformInput. The MobileInput menu item was already there without me having to do that. consufed.com – Big T Larrity Jul 9 '17 at 15:54
• I've actually managed to link in the onscreen joystick to the prefab car now, but annoying the joystick and the buttons are in different scripts so im currently trying to find out how to make the button accel the car and make the horizontal axis for joystick steer the car. Hopefully with some hard work I can figure it out. thanks for help! – Big T Larrity Jul 9 '17 at 15:55
• @DMGregory Nice catch. – Draco18s no longer trusts SE Jul 9 '17 at 18:39