Unveiling the Overhauled PubNub Unity SDK

3 min read Oliver Carson on Oct 3, 2023

We are excited to introduce the overhauled PubNub Unity SDK, a significant update designed to provide Unity developers with the best possible experience when working with our real-time APIs to power any feature needed for online development. This SDK is essential for managing PubNub functionality in Unity, from configuring UserId(UUID) parameters to message filter functions, managing custom JSON metadata, compatibility with diverse data types, and handling the push payload for mobile push notifications for Android and iOS builds.

Our commitment to enhancing the PubNub platform led us to focus on improving the SDK, making it more user-friendly, optimizing behind-the-scenes functionality, and ultimately streamlining the development process for Unity developers. This way, developers can focus on exciting aspects of their game and let us handle the heavy lifting of online features.

“As one of the leading platforms for building and scaling the operations of live games, Beamable is thrilled to be capitalizing on the expanded capabilities of PubNub’s new Unity SDK for real-time interactivity in chat, guilds, commerce, and more,” said Ali El Rhermoul, Co-Founder & CTO of Beamable, “from streamlined setup requirements to improved Unity-specific functionality, all help to support our mission of making it easier for developers to build better games; faster and with fewer barriers to success.”

The Overhauled Unity SDK

The newly updated PubNub Unity SDK brings significant improvements and exciting new features to help Unity developers create real-time, engaging experiences. These changes are targeted to improve performance and ease-of-use and install, update, and set up the Unity SDK. Let's take a look at the highlights of the overhauled SDK:

  • Easy Configuration: Upon installing the SDK from GitHub, an intuitive configuration window will present itself, guiding you through a swift and simple setup process for the SDK.

  • Rewritten Documentation: Our documentation has been completely rewritten with the new installation, set-up, and usage of the new functions.

  • Compatibility facade: To facilitate a smooth transition from the old SDK, we have introduced a compatibility facade that allows developers to continue using their existing codebase while taking advantage of the new SDK's features. Furthermore, you'll even be able to use vanilla C# code if you prefer to use our C# SDK instead.

  • Unity-specific functionality: The updated SDK focuses on providing Unity-specific functionality by introducing convenient extensions and methods tailored for Unity developers. This Unity-specific functionality is centered around best Unity practices and ensures a reliable, efficient, and easy-to-follow experience.

  • Async/Await: While the old SDK’s methods returned data using callbacks (such as for a subscribeCallback), async and await are much more standard return methods to handle any number of messages that arrive. You can still extract the event arguments, such as subscribeEventEventArgs for subscribe call events.

  • PN Debugging tools: The overhauled SDK extends the Unity Editor with PubNub Debugging tools, enhancing the tooling capabilities for Unity developers.

These improvements, combined with our ongoing commitment to providing the best possible experience for Unity developers, make the overhauled PubNub Unity SDK an essential tool for creating real-time applications and games.

  • Ready-to-use building blocks: The updated SDK comes with a bundle of ready-to-use building blocks for creating features like Leaderboards, Chat, Friend Lists, and more, enabling developers to create engaging experiences faster.

  • Integration with common tools: The new SDK integrates seamlessly with popular Unity tools, such as Visual Scripting and dependency injection frameworks, simplifying the development process.

What Will the New Unity SDK Mean for Me?

The overhauled PubNub Unity SDK offers numerous benefits for developers creating real-time applications and games:

  • Rapid Prototyping: The new SDK enables developers to go from installing the package to a working prototype with just a few mouse clicks. This ease and speed of prototyping allow developers to quickly iterate and refine their ideas, ultimately resulting in better end products.

  • Improved Reliability: The updated SDK boasts increased reliability, ensuring that your real-time applications provide a consistent, high-quality user experience.

  • Interoperability: The new SDK's focus on interoperability reduces friction for customers using vanilla C# in other projects, making integrating PubNub services into a wide range of applications easier.

What's Next

The overhauled Unity SDK will allow you to install easily, set up, and update the Unity SDK with future versions and depend on the SDK to reliably handle resources, ensure solid performance, and follow proper Unity best practices.

To get started with the new PubNub Unity SDK, check out the following resources and tutorials:

We want to reiterate our commitment to continually improving the experience of Unity developers with the overhauled PubNub Unity SDK. We encourage you to download and try out the new SDK for your real-time projects, and provide us with your valuable feedback or questions anytime at to help us further refine and enhance the product.