Unity

C# Scripts & Other Tips

1stly Here is a useful link that explains Creating and Using Scripts

General Tips

I am always learning new things about Unity and quicker or less problematic ways of doing things.

Code Tips

 

Scripting can be very confusing when following tutorials online. Here are some tips i have discovered.

Hotkeys

A few Hotkeys to help speed things up a little

Snippets

Short and Simple lines of useful code.

Sound play on collision (2D)

 

Getting a sound to play when one object hits another.

GUI Button open a webpage

A short tutorial on how to add a button that when clicked opens up a webpage in your default browser.

Destroy object after time

A Script that allow you to have objects disappear after a set amount of time.