Skip to content
Send the Processing screen buffer to other softwares (Currently support only to Unity3D 5+)
Branch: master
Clone or download
Lucas Cassiano Silva Lucas Cassiano Silva
Lucas Cassiano Silva and Lucas Cassiano Silva Version 1.1
Fixed package size issue with Windows 10.
Latest commit b51a18b Oct 11, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
Processing Version 1.1 Oct 11, 2016
Unity Update Oct 9, 2016
example_unity.png Image Example Oct 8, 2016

Processing to Unity

Render Processing Sketches Screens as an Unity Texture2D (compatible with Windows, OSX and Linux) Preview

Get Started

Download the files from the github repository:


  • Add the file ScreenBroadcast.pde to your sketch folder
  • Add the methods as showed on the example


  • Add the file ProcessingToTexture.cs to your Assets folder.
  • Create (or import) any 3D object, for example, a quad (GameObject > 3D Object > Quad)
  • Drag and drop the ProcessingToTexture.cs to the gameObject
  • Set the width and height based on the width and height from processing skecth
  • If you want run interactions on the processing sketchs, enable Unity to run on background (File > Build Settings > Player Settings... > check Run On Bakground)

Basic Example (Processing)

ScreenBroadcast sb;

void setup() {
  sb = new ScreenBroadcast();
  size(800, 800);

void draw() {
  //Draw things here!

  //Add some delay, change to higher values to have higher
  //Anything bellow this line will be not send to Unity

Basic Example (Unity)

Unity example

Data Transference

This simple system sends multiple chunks of byte arrays from processing to Unity, using by default the localhost ip "" at port "8051".

ScreenBroadcast Methods

Method return Parameters Role
BroadcastSplit void PImage Broadcast Splitted data (split by 4)
Broadcast void PImage Broadcast one package per time (deprecated)
getImageBytes byte[] Pimage Return the bytes from the image encoded as JPG



You can’t perform that action at this time.