Skip to main content

Step-by-step Guide

This step-by-step guide outlines the process of creating a playable ad from an existing Unity project with Playable Plugin.

Additionally, we have included some of our tips for working with Luna, 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.

1. Design your playable ad

  • Before touching your code, plan what 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 Luna 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.

2. Create your playable scene in Unity

  • Once you've designed your playable flow, create a standalone playable scene in Unity.
  • 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!

3. Tidy up your scene and remove any unnecessary APIs / SDKs

  • You don't want to include your entire codebase in the playable if you don't have to - this will increase 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.

4. Install all required dependencies for Luna

  • Review our guide on dependencies.
  • Notably - ensure you have .NET 4.7 and MS-Build installed.

5. Install Luna

6. Select Assets

  • 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.

7. Compile code

  • Luna supports the majority of Unity APIs which you'll need to build a playable scene - but we don't support everything (check out our tips for more info.)
  • You can use the Diagnostics Window feature to check for any compilation issues before you start the build process.
  • Review our documentation on preparing your code to get started.

8. Optimise size

  • Luna provides a number of tools to help optimise your playable.

9. Optimise runtime performance

  • Runtime performance massively impacts the playable experience.
  • Review our tips and runtime performance docs for some best practices.

10. Create a Develop build.

  • There are two types of Luna builds: Creative Suite build (Zip file) and a develop build that can be used to open a server and preview in a browser. We recommend using the develop build when testing and optimising your playable.
  • The final output will be output in PROJECT > LunaTemp > Stage4 > develop.
  • 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.

11. Playable Variables

  • Expose any variables you want to be control using Luna Attributes, these can be configured later in Luna Creative Suite to create many variants of your playable.

12. Review the Ad Network requirements

  • Some networks require specific API calls to track the ads life cycle - review the overview here.

13. Add required APIs (Install Game, End-game) and Analytics events

  • Use our playable APIs to trigger store redirects and manage ad network life cycle events.

14. Use Custom Events to track specific events within your playable

  • 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.
Note: Playable Insights is only available with Pro and Enterprise Subscriptions.

15. Upload to Luna Creative Suite

  • Once you are happy with the playable, you can create a Creative Suite 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 iOS and Android app store links in the Settings > Ad Network tab.
    • Add your game name in the Settings > Ad Network tab.
    • Add a Package Id and Product name for your playable in the Creative Suite section.
  • Creative Suite builds can be uploaded directly from the Playable plugin or manually in the Creative Suite interface.