Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rally Unity SDK (com.rallynetwork.sdk)

UPM package for Rally placements in Unity 2021.3+: configure, decide (coroutine + UnityWebRequest), banner UI, and experience presenters.

Install via git URL

In Unity Package Manager → Add package from git URL:

https://github.com/davidminin/rally-unity-sdk.git

Or pin a tag/branch:

https://github.com/davidminin/rally-unity-sdk.git#main

Quick start

var sdk = RallySdk.EnsureInstance();
sdk.Configure("https://api.rallynetwork.io", "org_…");

sdk.Decide("home_banner", decision =>
{
    if (decision == null || !decision.show || decision.config == null) return;
    bannerView.Bind(decision.config, _ =>
    {
        IExperiencePresenter presenter = new ExternalBrowserPresenter();
        // Or: new EmbeddedWebViewPresenter(); // stub / UniWebView hook
        sdk.OpenExperience(decision, presenter);
    });
}, err => Debug.LogWarning(err));

Presenters

Type Behavior
ExternalBrowserPresenter Application.OpenURL
EmbeddedWebViewPresenter Stub: logs + OnOpenRequested callback. Hook UniWebView (or similar) in your project.

Async style

Default is coroutines (zero extra packages). UniTask is optional; wrap DecideCoroutine yourself or enable a future #if UNITASK helper.

Samples

Package Manager → Rally Network SDK → Samples → Home Banner.

Tests (EditMode + PlayMode)

  1. Open the package (or a project that references it) in Unity 2021.3+.
  2. Window → General → Test Runner.
  3. EditMode tab → run RallySDK.Tests.EditMode (PlacementConfig JSON round-trip).
  4. PlayMode tab → run RallySDK.Tests.PlayMode (external open_mode → recorded URL; no UniWebView required).

PlayMode tests set ExternalBrowserPresenter.SuppressApplicationOpen so CI / local runs do not call Application.OpenURL.

Agent context

Specs and agent skills live in the sibling rallynetwork monorepo. See CONTRIBUTING.md.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages