C++ integration
Add GraffityARCloudRuntime to your module dependencies and AugmentedReality when you pass a managed session config. The supplied GraffitySampleActor.h/.cpp is the compiled complete example.
#include "GraffityARCloudComponent.h"
void ConfigureGraffity(UGraffityARCloudComponent* Component,
const FString& RuntimeToken)
{
if (UGraffityARCloudSession* Session = Component->CreateSession())
{
FGraffityARCloudConfiguration Config;
Session->Configure(Config, RuntimeToken);
}
}Create the component as a default subobject or a registered instance on a world Actor. Bind dynamic delegates with AddUniqueDynamic to reflected receiver methods; keep the component/session in a UPROPERTY. Pass UARSessionConfig* only for managed mode. AGraffitySampleActor::BeginLocalization configures and starts, Navigate selects a complete destination, Cancel stops navigation/localization, and EndPlay removes bindings and shuts down.
A native host can call Initialize(World, Services) on a new session before Configure to inject a location source, analytics store or diagnostics. The component path supplies production transport and capture automatically. Service callbacks are marshalled to the game thread and rejected after generation changes. Keep host-injected services alive for their required work lifetime.
All public session commands run on the game thread. Do not issue new commands recursively inside state delegates; defer them to a later tick. Shutdown and component/world teardown cancel owned work. Replace credentials with ReplaceAccessToken; pending auth/capture/VPS/navigation results are revoked.