For complete overview of the project, please visit the Unity package GitHub repository.
This is a Node.js app that serves two purposes:
index.html
file)Note that this repo is essentially only that. So it isn’t mandatory to be used with a Unity game. Actually, the project from which this project has been forked implements a fully js T-Rex game.
This project contains a very simple Unity Game, which uses the unity-telegram-game package.
The first step is to create a Telegram bot. Talk to the BotFather and store the token it will give you.
In this app, we will only do two things related to the bot:
/game
public
folder in the config)public
folder.env
file with the following content:
BOT_TOKEN=<your-telegram-bot-token>
SCORE_TOKEN = "<your-score-token-1>;<your-score-token-2>;..."
The score tokens are the numbers you will use to obfuscate the score. They must be also set in the Unity game.