This is a very short how-to to show the creation of a new C-Sharp (C#) script in Unity3D
- Open Unity3D
- Select the project tab
- Select ‘Assets’
- In the middle pane right click and select ‘Create/C# script’
- Name the script to your liking (eg. Test1)
- Double click the script to open the MonoDevelop editor
To use this script you can do the following
- Select a GameObject in the ‘Hierarchy’ area
- Go to the inspector
- Hit the button ‘Add component’
- Type the name of your new script (eg.: Test1)
- The script shows up and you can select it
That’s it
Shortcut
There is also a quicker way to do that:
- Select a GameObject
- Hit ‘Add component’
- Type ‘New ‘ and select ‘New Script’
- The wizard guides you through to create a new script
[…] register for such events it is easiest if you create a new script that implements the OnMarkerFound() and OnMarkerTracked() functions and to attach this script to […]