Step-by-step Guide

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

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!
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 Luna

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

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

7. Optimise size

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

8. Optimise runtime performance

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

9. Playable Variables

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

10. Review the Ad Network requirements

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

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

12. Upload to Luna Playground

  • Once you are happy with the playable, you can create a Playground build, when uploaded to our website you can use this to configure/deploy your ad.
  • Ensure you upload an icon and fill in the app store link on the Luna plugin before export.
  • Playground builds can be uploaded directly from the Playable plugin.