Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
version: v9.4.0
version: v9.4.1
changelog:
- date: 2026-07-06
version: v9.4.1
changes:
- type: bug
text: "Implemented minor fixes to error handling, logging, and cryptor logic."
- date: 2026-06-15
version: v9.4.0
changes:
Expand Down Expand Up @@ -807,7 +812,7 @@ sdks:
distribution-type: package
distribution-repository: git release
package-name: PubNub.unitypackage
location: https://github.com/pubnub/unity/releases/download/v9.4.0/PubNub.unitypackage
location: https://github.com/pubnub/unity/releases/download/v9.4.1/PubNub.unitypackage
requires:
-
name: "UnityEditor"
Expand Down Expand Up @@ -939,7 +944,7 @@ sdks:
distribution-type: package
distribution-repository: git release
package-name: PubNub.unitypackage
location: https://github.com/pubnub/unity/releases/download/v9.4.0/PubNub.unitypackage
location: https://github.com/pubnub/unity/releases/download/v9.4.1/PubNub.unitypackage
requires:
-
name: "UnityEditor"
Expand Down
Binary file modified PubNubUnity/Assets/PubNub/Runtime/Plugins/PubnubApiUnity.dll
Binary file not shown.
46 changes: 46 additions & 0 deletions PubNubUnity/Assets/PubNub/Runtime/Plugins/PubnubApiUnity.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions PubNubUnity/Assets/PubNub/Runtime/Util/PNConfigAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public class PNConfigAsset : ScriptableObject {
public string SecretKey = "";
public string AuthKey;
public string CipherKey;
public bool Secure;
public bool Secure = true;
public int NonSubscribeRequestTimeout = 15;
public int SubscribeTimeout = 310;
public PNReconnectionPolicy ReconnectionPolicy = PNReconnectionPolicy.EXPONENTIAL;
public bool MaintainPresenceState = true;
public bool EnableEventEngine = true;
public bool EnableWebGLBuildMode;
public bool EnabbleHttp2 = true;
public bool EnableHttp2 = true;
public bool LogToUnityConsole = true;
[Tooltip("Obsolete and used in legacy logging, if you can please use LogLevel instead")]
public PNLogVerbosity LogVerbosity;
Expand All @@ -38,7 +38,7 @@ public static implicit operator PNConfiguration(PNConfigAsset asset) {
config.PublishKey = asset.PublishKey;
config.SecretKey = asset.SecretKey;
config.AuthKey = asset.AuthKey;
config.EnableHttp2 = asset.EnabbleHttp2;
config.EnableHttp2 = asset.EnableHttp2;
config.CipherKey = asset.CipherKey;
config.NonSubscribeRequestTimeout = asset.NonSubscribeRequestTimeout;
config.SubscribeTimeout = asset.SubscribeTimeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public static Pubnub NewUnityPubnub(PNConfiguration configuration, bool webGLBui
/// <returns>A new initialized Pubnub instance.</returns>
public static Pubnub NewUnityPubnub(PNConfigAsset configurationAsset, string userId,
IPNSDKSource ipnsdkSource = null) {
configurationAsset.UserId = userId;
var pnConfig = ((PNConfiguration)configurationAsset);
pnConfig.UserId = userId;
return NewUnityPubnub(pnConfig, configurationAsset.EnableWebGLBuildMode,
configurationAsset.LogToUnityConsole, customIpnsdkSource: ipnsdkSource);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace PubnubApi.Unity
{
public class UnityPNSDKSource : IPNSDKSource {

private const string build = "9.4.0";
private const string build = "9.4.1";
public string Build => build;

public string GetPNSDK() {
Expand Down
2 changes: 1 addition & 1 deletion PubNubUnity/Assets/PubNub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.pubnub.sdk",
"version": "9.4.0",
"version": "9.4.1",
"displayName": "PubNub SDK",
"description": "PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks",
"unity": "2018.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ static void PubnubInit()
{
SubscribeKey = "YOUR_SUBSCRIBE_KEY",
PublishKey = "YOUR_PUBLISH_KEY",
// WARNING: The SecretKey grants full admin access to your keyset. Set it ONLY in secure,
// server-side applications. Never ship the SecretKey in a client app (game build, mobile, browser).
SecretKey = "YOUR_SECRET_KEY",
};
//Create a new PubNub instance
Expand All @@ -39,6 +41,7 @@ static void PubnubInit()
static async Task GrantTokenComplex()
{
// snippet.grant_token_complex
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUuid("my-authorized-uuid")
Expand Down Expand Up @@ -72,6 +75,7 @@ static async Task GrantTokenComplex()
static async Task GrantTokenWithRegex()
{
// snippet.grant_token_regex
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUuid("my-authorized-uuid")
Expand All @@ -97,6 +101,7 @@ static async Task GrantTokenWithRegex()
static async Task GrantTokenComplexWithRegex()
{
// snippet.grant_token_complex_with_regex
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUuid("my-authorized-uuid")
Expand Down Expand Up @@ -135,6 +140,7 @@ static async Task GrantTokenComplexWithRegex()
static async Task GrantTokenOldBasicUsage()
{
// snippet.basic_usage_old
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUserId("my-authorized-userId")
Expand All @@ -161,6 +167,7 @@ static async Task GrantTokenOldBasicUsage()
static async Task GrantTokenOldComplex()
{
// snippet.grant_token_complex_old
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUserId("my-authorized-userId")
Expand Down Expand Up @@ -192,6 +199,7 @@ static async Task GrantTokenOldComplex()
static async Task GrantTokenOldWithRegex()
{
// snippet.grant_token_old_regex
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUserId("my-authorized-userId")
Expand All @@ -217,6 +225,7 @@ static async Task GrantTokenOldWithRegex()
static async Task GrantTokenOldComplexWithRegex()
{
// snippet.grant_token_complex_old_with_regex
// WARNING: GrantToken requires the SecretKey and must ONLY be called from a secure, server-side application. Never ship token-granting logic in a client app.
PNResult<PNAccessManagerTokenResult> grantTokenResponse = await pubnub.GrantToken()
.TTL(15)
.AuthorizedUserId("my-authorized-userId")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ private async void Start() {
Manage = true
};

//WARNING: Token granting requires the SecretKey and must ONLY be performed in a secure, server-side
//application. Never ship GrantToken logic or the SecretKey in a client app (game build, mobile, browser).
//Asynchronously executing a full-access grant operation for the test channel for user ID specified in the config
//The $"{testChannelId}{Constants.Pnpres}" addition ensured full access to the channel with PubNub Presence operations
var grantResult = await pubnub.GrantToken().TTL(30).AuthorizedUuid(pubnub.PNConfig.UserId).Resources(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ static void BasicUsage()
{
SubscribeKey = "demo", // Required
PublishKey = "demo", // Only required if publishing
// WARNING: Set SecretKey ONLY in secure, server-side applications. Never ship the SecretKey
// in a client app (game build, mobile, browser); it grants full admin access to your keyset.
SecretKey = "SecretKey", // Only required for access operations
Secure = true, // Enable SSL
AuthKey = "authKey", // If Access Manager is utilized
Expand Down Expand Up @@ -165,6 +167,8 @@ static void InitSecretKey()
PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId"));
pnConfiguration.PublishKey = "my_pubkey";
pnConfiguration.SubscribeKey = "my_subkey";
// WARNING: The SecretKey must ONLY be used in secure, server-side applications. Never include it
// in a client app (game build, mobile, browser); it grants full admin access to your keyset.
pnConfiguration.SecretKey = "my_secretkey";
pnConfiguration.Secure = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class PubnubConfigurationExample : MonoBehaviour {
[SerializeField] private string userId = "myUniqueUserId";
[SerializeField] private string subscribeKey = "demo"; // Replace with your actual SubscribeKey
[SerializeField] private string publishKey = "demo"; // Replace with your actual PublishKey if publishing is needed
// WARNING: The SecretKey grants full admin access to your keyset and must ONLY be used in secure,
// server-side applications. Never ship it in a client app (game build, mobile, browser).
[SerializeField] private string secretKey = "yourSecretKey"; // Used if Access Manager operations are needed
[SerializeField] private string authKey = "authKey"; // Used if Access Manager is enabled
[SerializeField] private string filterExpression = "such=wow";
Expand All @@ -25,6 +27,7 @@ private void Start() {
PNConfiguration pnConfiguration = new PNConfiguration(new UserId(userId)) {
SubscribeKey = subscribeKey,
PublishKey = publishKey,
// WARNING: Setting SecretKey should ONLY happen in secure, server-side applications, never in a client app.
SecretKey = secretKey,
AuthKey = authKey,
Secure = useSSL,
Expand Down
1 change: 0 additions & 1 deletion PubNubUnity/Assets/link.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<linker>
<assembly fullname="PubnubApiUnity" preserve="all"/>
<assembly fullname="Newtonsoft.Json" preserve="all"/>
<assembly fullname="PeterO.Cbor" preserve="all"/>
<assembly fullname="System.Core">
<type fullname="System.Linq.Expressions.Interpreter.LightLambda" preserve="all" />
</assembly>
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.4.0
9.4.1
Loading