Saving a list of highscores to a players device is not too complicated.

For a quicker implementation we will use PlayerPrefs which is a native unity class.

Start with making your default names and scores, have these as separate text elements so it makes it easier to edit them through…

Setting up the ability to use IK rigging in unity requires the use of a preview package, at least at the time of writing this 25/06/2021

Add the Animation Rigging package to unity through the package manager, if you cannot find it, it may still be in preview build which will require you to enable preview packages.

To enable preview packages in unity go into to project settings through the edit menu or click on the cog in the package manager and select advanced project settings.

Then in Project Settings find the Package Manager submenu, then at the bottom Advanced Settings, Enable Preview Packages.

Using interfaces you can easy track enemies or destructible objects for ontrigger events, for a simple interface we start with a new script, we call it IDamagable. we then change it from a public class that inherits from monobehaviour to a public interface that doesn’t inherit.

This turns it into…

Using raycast is an effective way of calculating hits for guns.

To do that we need to start our ray from a point on the screen, we are using slightly off centre for our simulation, so we make ourselves a variable to store this vector. we also make ourselves a variable to store our ray and rayhit.

Then using an if statement we check if our raycast hits anything of value for a response, in this case anything with an IDamagable inheritance script. if we find it we are dealing damage, and instantiating a bloodsplatter effect at the point of hit, then starting a corutine which will stop us shooting for a short period of time.

Onclick events are a simple but powerful way to make your buttons impactful to your program.

Whether it is something simple as incrementing a counter or some longer functions that check other parts of your code to verify and execute other functions.

Today I am going to go over 2…

Jason Dixon

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store