Unity 7.0.0 Migration Guide
Unity SDK version 7.0.0 lets you use PubNub from the Unity Editor. This enables real‑time testing, debugging, and prototyping without building to target platforms.
This guide is for developers who use Unity SDK earlier than 7.0.0 in existing applications.
If your application uses Unity SDK 6.x.x or earlier, it continues to work. We recommend migrating to Unity 7.0.0 because 6.x.x won't receive new features.
This guide summarizes the differences between the versions and shows how to migrate to Unity SDK 7.0.0.
Differences between 6.x.x and 7.0.0
While how applications use the Unity SDK hasn't changed fundamentally from 6.x.x to 7.0.0, the new version is more Unity‑specific. It speeds up integrating PubNub into your Unity project. Version 7.0.0 also supports game‑development use cases, like sending textures. For API details, see the Unity SDK documentation.
See the major differences between the two versions:
| Feature/Method | Unity SDK 6.x.x | Unity SDK 7.x.x | 
|---|---|---|
| Namespaces | PubNubAPI | PubnubApiPubnubApi.Unity | 
| Instance name | PubNub | Pubnub | 
| JSON Library | PubNub.JsonLibrary | Pubnub.JsonPluggableLibrary | 
| Message Payload | PNMessageResult.Payload | PNMessageResult.Message | 
| Signal Payload | PNSignalResult.Payload | PNSignalResult.Message | 
| Push Notifications Removal | PubNub.RemoveAllPushNotifications | Pubnub.RemoveAllPushNotificationsFromDeviceWithPushToken | 
| Execution Method | Async | ExecuteConsider using the new ExecuteAsyncmethod (returns aTask) that enables theawaitC# feature. | 
| Message Fetching | PubNub.FetchMessages | Pubnub.FetchHistory | 
| Unsubscribe Method | Unsubscribe.Executeaccepts a callback. | Unsubscribe.Executedoesn't accept a callback. | 
| Device ID | DeviceID | DeviceId | 
| File Name | File.Name | .FileName | 
| File Path | File.FilePath | .File | 
| Post Method | Publish.UsePost | Publish.UsePOST | 
| Unsubscribe All | UnsubscribeAllis not instant. | UnsubscribeAllis instant, doesn't accept arguments. | 
| Clean Up | CleanUpis available. | CleanUpis removed, useUnsubscribeAllinstead. | 
| Error Data | PNErrorData.ExPNErrorData.Info | PNErrorData.ThrowablePNErrorData.Information | 
Migration steps
To migrate from Unity SDK 6.x.x to 7.0.0, upgrade the SDK in your project, review the differences listed in the table, and update your code accordingly.