Installation varies depending on your input handling preference. Cheater is designed to work with Unity’s new Input System, but also supports Rewired and even custom input handling.
Cheater’s keyboard & joystick maps are all set by default. You are free to customize them by updating the Input Action Asset:
Assets\Dragon Arts\Cheater\Integration\InputSystem\CheatActions.inputactions
IMPORTANT: Do NOT import Input System related files. Untick them during import process or simple delete them from your project after the import completition!
To make an Example Scene work with Rewired, follow these additional steps:
Assets\Dragon Arts\Cheater\Integration\Rewired\RewiredInputManagerDataExport.json
IMPORTANT: Do NOT import Input System related files. Untick them during import process or simple delete them from your project after the import completition!
To make an Example Scene work with custom input handling, follow these additional steps:
NOTE: CustomInputHandler.cs is only an example handler, you are free to use your own custom input handling.
In order to implement your first cheat, you have to establish a Cheat Manager:
Hierarchy Window (Right Click) > Create Other > Dragon Arts > Cheat Manager
NOTE: It is recommended to create the Cheat Manager in your persistent scene.
Cheat Manager represents a single source of truth, which controls the whole flow of cheats execution. Requires only 2 entities to operate:
Cheats are represented as simple ScriptableObjects, which can be easily created straight from the Project Window:
Project Window (Right Click) > Create > Dragon Arts > Cheat
Each cheat has to be distinguished by a unique code and optionally a unique sequence of actions (keystrokes).
NOTE: Cheat Codes are case-insensitive.
There are 2 types of Cheats:
By checking the Deactivatable checkbox is the Cheat is assumed as Deactivatable Cheat.
What’s the difference?
Regular Cheat can be executed only one time, while Deactivatable Cheat is at first execution activated and if you execute it second time, it deactivates.
Project Window (Right Click) > Create > Dragon Arts > CheatExecutor C# Script
Cheat Executor is a C# Script, where you are able to implement your algorithms and hook them to individual cheats by their codes.
There are only 3 functions to work with:
Now that you know how to create cheats, here’s the last thing you need to do. In order to get visual feedback from Cheater about cheats execution, activation or deactivation you have to establish a Cheat Canvas:
Hierarchy Window (Right Click) > Create Other > Dragon Arts > Cheat Canvas
NOTE: It is recommended to create the Cheat Canvas in your persistent scene.
Cheat Canvas contains also a Cheat Input, which is the one of main ways to enter a cheat during gameplay.
NOTE: If you are not working on projects targeting mobile devices, you are free to skip this part.
Hierarchy Window (Right Click) > Create Other > Dragon Arts > Cheat IO Zone
Cheat IO Zone is a utility, which is meant to be always created inside of a GameObject.
There are 2 versions, one for 2D & one for 3D GameObjects. It copies the dimension of parent GameObject at startup & creates a clickable zone, which is then used to invoke the Cheat Input during gameplay.
By the help of these zones, you are able to invoke Cheat Input even on mobile devices.
NOTE: Cheat IO Zone overrides parent GameObject clickable zone, so do NOT use it on GameObjects, which should be clickable during gameplay!
Cheats can be executed by various ways depending on platform.
Maybe the most common way of cheating is executing cheats straight from Unity Editor.
Cheating by this way is best for Developers during debugging.
In case that you want cheat outside of Editor you can use Cheat Codes. Cheat Codes have to be inserted into Cheat Input, which you can invoke by holding down certain combination of keys.
NOTE: Combination of keys to invoke Cheat Input can be customized on Component Cheat Manager – Cheat Input Settings
To be able to use Cheat Codes on Consoles, you will need to import console-specific APIs, which deals with text inputs. There is no problem with this method at all (Tested on Xbox One & PS4), but there is one more way to cheat. Instead of using Cheat Codes to execute a Cheat, you can use Cheat Sequence.
Cheat Sequence is represented as a list of keys, which you need to press in certain order.
If you decide, that you want exclude Cheat Codes from your workflow, because of unavailability of console-specific API or another problem, you can simply deactivate Cheat Input by adding a new Scripting Define Symbol: CHEATER_OLD_SCHOOL
Mobiles are specific in terms of cheating, because there is only a touch screen to operate with. You are not able to invoke Cheat Input by a Combination or use a Cheat Sequence. That’s why, you need to first setup Cheat IO Zones in your scenes and then invoke Cheat Input by help of them, by tapping on zone certain times in row.
NOTE: Number of taps to invoke Cheat Input can be customized on Component Cheat Manager – Cheat Input Settings
Now when you know how to implement and execute cheats, there is a last thing to notice. Your implemented cheats can be easily shared with your colleagues in form of structured .txt file, which you can generate from Unity Menu Bar:
Tools > Dragon Arts > Export Cheats
The generated file:
Assets\Cheats.txt
Cheater does NOT allow to enter cheats in production builds by default and also excludes from builds everything that has to do with cheats, so you don’t need to be afraid.
If you want to force Cheater to allow entering cheats in production builds, you can do that by adding new Scripting Define Symbol: CHEATER_FORCE
IMPORTANT: Do NOT forget to remove this Scripting Define Symbol and rebuild your project before your submission!
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |