Kodeco Forums

How to Make a Game Like Jetpack Joyride in Unity 2D – Part 1

Learn how to create a game like Jetpack Joyride in Unity 2D in this three part tutorial series.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5458-how-to-make-a-game-like-jetpack-joyride-in-unity-2d-part-1

HELP!
It says:
Can 't add script
Can’t add script behaviour AssemblyInfo. The script needs to derive from MonoBehaviour!

The problem comes from adding the #c script into the mouse character in part 1
HELP PLEASE

@mplaczek Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi @ichjagealmanz,

Apologies for the delay in replying to this!

This error is not caused by the script itself, rather Unity does not know it is part of the project.

The best way to resolve this is to recreate your script from within the Unity Editor. We have not added any code at this point, so this should be painless!

  1. Open your Jetpack Joyride project in Unity.
  2. Delete your existing MouseController script.
  3. In the Project View, navigate to your Scripts folder.
  4. Click the Create dropdown on the top left of the Project View.
  5. Select C# Script.
  6. Immediately rename the new script MouseController.
  7. Drag the script over your mouse in the Hierarchy.

I hope this helps.
Any further problems give me a shout!

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!