1. Home
  2. Docs
  3. Anti Cheat
  4. How to start

How to start

Step 1:

After importing the Anti Cheat packet, open ‘Assets/OPS/AntiCheat/Prefabs’. Here you find the AntiCheat prefab. Place it in the first scene. (The scene you defined in your build settings.)

Step 2:

Define what happens if an cheater or hacker got detected. Open for this your programming environment. Create an Detector class. The best is to create an MonoBehaviour and add it to your first scene too.

Step 3:

Either you can use the Anti Cheat Auto Protection to protect your game, by activating the auto protection under ‘Window->Anti Cheat Settings’ or you can surely do it by yourself.

Step 4 (Continue for custom protection):

Here you see an example of how to use protected fields. Protected fields protect your game against memory cheating through softwares like Cheat Engine.

Step 5 (Continue for custom protection):

The Protected fields support most operators. So you can for example calculate with an ProtectedInt32 like you used to with Int32.

Step 6 (Continue for custom protection):

If you want to protect user settings, you can use the ProtectedPlayerPrefs. They can be used exactly the same like Unitys PlayerPrefs.

Step 7 (Continue for custom protection):

Speeding protection is an important component! ProtectedTime uses the cpu clock to calculate an not modifyable gamespeed.