Skip to main content

Sample Code

The Unity Playworks Plugin Community github is designed to help provide you with support, examples and updates on Unity Playworks Plugin products.

  • The Unity Playworks Plugin Community github GitHub contains projects, samples and assets to our users. Here you can find example project, free-to-use assets and examples of techniques and approaches that you can use in your playable ads.

Example Project

As an introduction to building creatives with Playworks Plugin, we have provided a free sample 2D game in our Community GitHub. This project acts both as an example of what a fully prepared & optimised project for Playable looks like, as well as a testing ground for implementing Playworks Plugin yourself!

We highly recommend trying out the walkthrough using the Dev Branch, as it will provide you with a great hands-on opportunity to learn how to use the Unity Playworks Plugin without needing to prepare a project from scratch yourself!

When designing this game's UI & end card we used some of our free assets, which can be downloaded for free from our community github.

info

You can download the project here in our community github!

images-xsmall

How to make use of the project

As previously described there are two different use cases for this project, which is why there are two branches (one for each).

How to choose:

  • The Master branch of this project has already been modified to be exportable to Unity Playworks as a lightweight editable playable. All you need to do is install the Unity Playworks Plugin , and un-comment the Unity Playworks Plugin attributes code located in GameManager.cs and PauseManager.cs to access variables in Unity Playworks. Then build for Unity Playworks (Plugin UI -> Unity Playworks -> Build & upload).

  • The Dev branch has been stripped of all changes made in the Master branch to work in Luna. Downloading this branch and following the steps on the repository's readme will provide you with a great hands-on opportunity to learn how to use the Unity Playworks Plugin.

What you will learn

If you choose to download the Dev branch and follow along the walkthrough detailed on the repo's readme, you will learn about the following:

  • Setting up the Playworks Plugin Plugin
  • Making a develop build (How to select your scene & fixing msbuild errors)
  • Fixing Plugin Diagnostic Errors (Excluding files & preprocessing lines)
  • Size Breakdown Calculation & Reduction
  • Building & Uploading to Unity Playworks