Step-by-step Guide
This step-by-step guide outlines the process of creating a playable ad from an existing Unity project with Playworks Plugin.
Additionally, we have included some of our tips for working with Plugin, including some of the commonly used Unity APIs we don't currently support.
Keep in mind, that with a playable ad, we only need to highlight a small part of the game. Having a plan before starting out will massively speed up the process, and ensure you end up with an effective ad. And of course, HTML ads also have specific restrictions and performance limitations.
Step 1: Design your playable ad
- Before you start to edit your code, plan what features and gameplay the playable ad will show off! Sit down with your creative and UA teams to identify what you want your users to experience.
- Check out the design guidelines for ideas on what to include.
- Consider the must have features !
- Check out our free asset pack , available for all Unity Playworks Plugin customers to use in their creatives.
When designing your playable ad, keep in mind that the final output will be HTML + JavaScript running in a performance constrained environment. Keeping the playable simple will not only benefit the user experience, but also the runtime performance across devices.
Step 2: Create a new scene in Unity
- Once you've designed your playable flow. We recommend to create a standalone scene in Unity for you playable.
- You can make use of your existing script and assets , which reduces development time and ensures your playable is a true representation of your game!
- You don't want to include your entire codebase in the playable as this will increase the build times and bloat your playable's size unnecessarily.
- For the best performance, the scene should only include essential assets, libraries and code.
Try to remove anything you don't need. - Remember that each ad network has a build size limit when exporting your playable.
- Remove all Ads SDKs and Analytics. These can be removed, or simply excluded from the project, alternatively if these are heavily integrated with your code consider using automatic stubbing to mock them.
- If you use external plugins, then please review our guide. In summary, you can only use plugins with C# source code, we don't support DLLs.
Step 3: Install all required dependencies
- Review our guide on dependencies.
- Notably - ensure you have .NET 4.7 and MS-Build installed.
Step 4: Install Playworks Plugin Plugin
- Download the latest plugin in Unity Playworks .
- Follow our installation guide to add Unity Playworks Plugin to your project.
Step 5: Select assets to export
- Only include the assets you require in the scene hierarchy and project folder.
- Selecting the appropriate assets for export is important, as ads networks have strict file size requirements.
Step 6: Create a develop build
- A build is the final output of the Unity Playworks Plugin Compilation.
- There are two types of Unity Playworks Plugin builds:
- Develop build: this one can be used to open a server and preview in a browser.
Located inPROJECT > LunaTemp > Stage4 > develop
- Unity Playworks build (Zip file): this build can be uploaded to Unity Playworks.
Located inPROJECT > LunaTemp > Stage4 > create-hub
We recommend using the develop build when testing and optimising your playable.
- Develop build: this one can be used to open a server and preview in a browser.
- Playworks Plugin supports the majority of Unity APIs which you'll need to build a playable scene. We are constatly working to support more functionalities but currently the plugin does not support everything Unity offers ( check out our supported features for more info about Playworks Plugin limitations .)
- Use the Project Diagnostics tab (within the Build and Upload section) to check for any compilation issues.
- Please have a look at our guides for preparing your code.
- Use an incognito window in Chrome to avoid plugin errors.
- Review our Debugging in JS for some tips on how to fix any JS runtime errors or browser issues.
Step 7: Optimize your playable
- plugin provides a number of tools to help optimise your playable.
Step 8: Add playable variables
- Expose any variables you want to be control using Unity Playworks Plugin Attributes , these can be configured later in Unity Playworks to create many variants of your playable.
Step 9: Review ad network requirements
- Each ad network has different requirements for playable ads.
- Review the ad network requirements to ensure your playable meets the requirements.
Step 10: Add required APIs and analytics events
- Use our playable APIs to trigger store redirects and manage ad network life cycle events.
Step 11: Add custom events
- Custom events allow you to track specific events within in your playables, as well as create your own.
- Examples:
TutorialStarted
,TutorialComplete
,LevelWon
,LevelFailed
etc. - Understanding the different paths of interactions users took to either closing, or installing your playables is key to optimising them.
Step 12: Upload your playable to Unity Playworks
- Once you are happy with the playable, you can create a Unity Playworks build, when uploaded to our website you can use this to configure/deploy your ad.
- Before uploading, make sure that you do the following:
- Upload an icon in Unity > Player Settings.
- Add your game name in the Settings > Ad Network tab.
- Add a Package Id and Product name for your playable in the Unity Playworks section.
- Unity Playworks builds can be uploaded directly from the Playworks Plugin or manually in the Unity Playworks interface.