Unity Quickstart Integration
These guides provide a fast, step-by-step path to integrating WireSyndicate placements into your Unity project.
WS Placement Dynamic (2D Texture Injector)
No Account Required: You can test this immediately using our public demo placement.
This is the simplest way to inject a 2D ad texture into a single material on a single GameObject.
- Install SDK: Add the SDK via Unity Package Manager using the Git URL (
https://github.com/WireSyndicate/wiresyndicate-unity-sdk.git). - Initialize: Create an empty GameObject in your scene and attach the
WireSyndicateInitializercomponent. - Configure Network Key & Game ID: In the inspector for the Initializer:
- Set the Network Key (Org ID) to
demo. - Set the Game ID to
11111111-1111-1111-1111-111111111111.
- Set the Network Key (Org ID) to
- Add Placement Node: Select the GameObject (e.g., a Billboard) where you want the ad to appear. Attach the
WS Placement Dynamiccomponent. - Configure Placement: In the inspector for the Placement Dynamic node:
- Set the Placement ID to
22222222-2222-2222-2222-222222222222(or your actual Placement ID). - Assign the Target Renderer (the MeshRenderer receiving the texture).
- Set the Material Index (usually
0).
- Set the Placement ID to
- Run: Press Play. The node will authenticate and stream the texture directly onto your geometry.
Global Texture Injection: WS Shared Material Node
Account Required: This requires a valid Developer Account and telemetry configuration.
The Shared Material Node allows you to map a single ad payload across hundreds of GameObjects efficiently by injecting the texture into a shared Material asset.
- Initialize: Ensure your
WireSyndicateInitializeris configured with your valid Network Key and Game ID. - Add Shared Node: Create an empty GameObject (e.g.,
[WS_Shared_Material]) and attach theWS Shared Material Nodecomponent. - Configure Placement: Set your Placement ID in the inspector.
- Assign Target Material: Drag your project's target Material asset (e.g.,
Billboard_Mat) into the Target Material slot. - Upload Spatial Data (Important):
- Run the
WS Transform Exportertool in Unity to generate yourtransforms.jsonfile containing all the positions of objects using this material. - Upload this JSON file to the Placement in your Developer Dashboard.
- Run the
- Run: Press Play. The SDK will inject the texture into the global material, updating all instances simultaneously while tracking telemetry for the uploaded transforms.
WS Placement 3D (AssetBundles)
Account Required: This requires a valid Developer Account and an active 3D campaign payload.
Use this to dynamically load and spawn full 3D models (AssetBundles) into your scene.
- Initialize: Ensure your
WireSyndicateInitializeris configured with your valid Network Key and Game ID. - Add 3D Node: Create an empty GameObject that will act as the spawn point anchor, and attach the
WS Placement 3Dcomponent. - Configure Placement: Set your Placement ID in the inspector.
- Run: Press Play. The SDK will download the AssetBundle and spawn the 3D prefab as a child of your anchor object.