Game Development Reference
In-Depth Information
Then, we will go back to Unity and create a new script named New3PSController by going
to Assets | Create | Javascript . Then, we will right-click it and choose Sync MonoDevelop
Project (if you set MonoDevelop as the main editor) or just double-click it to open the script.
It will open the new script in MonoDevelop (or your default editor Unitron/UniScite ).
In MonoDevelop , at the top left in the Solution view, you will see the name of our project;
click on the arrow in front of it. In the Assets folder, go to Assets | Standard Assets |
Character Controllers | Sources | Scripts . Double-click the FPSInputController file to open it.
Next, we go to the FPSInputController file, copy the code in it to the
New3PSController file that we just created. Then, we close the FPSInputController
file, and go to the New3PSController file at the end of this script. We will see the
following line of code:
@script AddComponentMenu ("Character/FPS Input Controller")
Change the preceding line of the script to the following one:
@script AddComponentMenu ("Character/New 3PS Controller")
We are changing the name of this script because we don't want to replace the built-in script
with the new one. This script will be added to the Component menu, which we will see in
the Unity Editor Component | Character | New 3PS Controller .
 
Search WWH ::




Custom Search