Getting started
Let's get your game up and running on Trail. Simply follow the steps in this guide, and remember that you can always write us a message if you have any questions.


Get the Trail SDK Editor Extension for Unity
The Trail SDK Editor Extension is the easiest and fastest way to get started using Trail in Unity. It contains the Trail SDK, a library that enables communication with Trail, as well as a UI for testing, running and uploading builds to Trail as efficiently as possible.
Get the SDK Editor Extension Developer Access required.
Add the Trail SDK to your project
1) Import the Asset Package into your project.
2) Switch Unity's build target to WebGL.
3) Open the Trail SDK window via the Unity menu: Window > Trail > Trail SDK.


Your firewall might now prompt you. The Editor Extension requires a connection to Trail to function, so make sure you click Allow access.
3) Log in with your Trail account.
4) If your project is not already set up to use WebGL as the target platform, go to File > Build Settings, select WebGL and click Switch Platform. This may take a while, depending on the size of your project.
5) Select your game in the Game dropdown. This lets us know which Trail game uploaded builds should belong to.
Initialize the SDK
1) Open the Editor Companion and keep it open. This will allow your game to establish a connection with Trail while playing it in Unity, which in turn will initialize the Trail SDK.


2) Enter Play Mode in Unity.


3) With the connection to Trail established via the Editor Companion, the SDK should now initialize.


4) Open the Unity console. If the Trail SDK has correctly initialized, the log entry trailsdk INF - Initialization successful
should appear in your console:
trailsdk INF - Initializing, SDK version: 2.0.0-750a2917, Unity version: 2019.3.0, dev_host: "127.0.0.1:23000"
trailsdk INF - Connecting to dev host at ws://127.0.0.1:23000/play/7qq9QsqNHj...
trailsdk INF - Connected to dev host
trailsdk INF - Initialization successful
Trail SDK initialization
The Trail SDK is automatically initialized when your game starts up. However, if you would rather have more precise control of when the SDK initializes, you can also disable the automatic initialization and explicitly call the
Init
method whenever it makes sense for your game.To disable the SDK automatic initialization uncheck the Initialize SDK At Startup option in the Assets/Trail/Resources/TrailConfig.asset
Excellent! You're all set up π Now it's time to make a build β.
Updated about 1 month ago