Getting Active Snapshots nested in Events

Hello, I was trying to create a list of active snapshots which seems to pretty straight forward since snapshots are represented the same way as events. I was able to get the list of event descriptions belonging to the snapshot in our games. However they do not seem to have any active instances as long the snapshot is activated via the timelines of other events. They do show up in the profiler in FMOD Studio however.


This is the setup of the parent Event in FMOD Studio. The snapshot is not activated anywhere else at the moment.
Explicitly creating an instance of the snapshot and playing this event instance does work and shows up as an active instance.

Is there a way to get these nested snapshots event instances?

To help this is how I was testing for this and saw that playing the event myself did work whereas events that where nested did not appear. I tried two different ways of accessing this data. First through the API directly like so:

void PrintSnapshotInstanceCounts()
{
	TArray<FMOD::Studio::EventInstance*> EventInstances;

	auto system = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Max);

	int bankCount = 0;
	FMOD::Studio::Bank* banks[FMODDEBUG_MAX_BANK_COUNT];
	system->getBankList(banks, FMODDEBUG_MAX_BANK_COUNT, &bankCount);

	for(int	i = 0; i <bankCount; ++i)
	{
		auto bank = banks[i];
		int eventCount = 0;
		FMOD::Studio::EventDescription* events[FMODDEBUG_MAX_EVENT_COUNT];
		bank->getEventList(events,FMODDEBUG_MAX_EVENT_COUNT, &eventCount);

		for(int	j = 0; j <eventCount; ++j)
		{
			auto event = events[j];
			bool isSnapShot;
			event->isSnapshot(&isSnapShot);
			if(!isSnapShot)
				continue;
			
			int eventInstanceCount = 0;
			FMOD::Studio::EventInstance* eventInstances[FMODDEBUG_MAX_SNAPSHOTINSTANCE_COUNT];
			event->getInstanceList(eventInstances,FMODDEBUG_MAX_SNAPSHOTINSTANCE_COUNT, &eventInstanceCount);

			char buffer[512];
			int usedBufferCount = 0;
			event->getPath(buffer, 512, &usedBufferCount);

			FString path = buffer;
			path = path.TrimEnd();
			
			UE_LOG(LogTemp, Error,TEXT("%s: %i"), *path ,eventInstanceCount);
		}
	}
}

and using the provided Assets from the built FMOD Project.

void PrintUFMODSnapshotInstanceCounts()
{
	const IAssetRegistry& assetRegistry = FAssetRegistryModule::GetRegistry();
	TArray<FAssetData> snapShotAssetData;
	assetRegistry.GetAssetsByClass(UFMODSnapshot::StaticClass()->GetFName(), snapShotAssetData);

	for( auto asset : snapShotAssetData)
	{
		auto snapshot =Cast<UFMODSnapshot>(asset.GetAsset());
		if(!IsValid(snapshot))
			continue;

		auto event = IFMODStudioModule::Get().GetEventDescription(snapshot);
		int eventInstanceCount = 0;
		FMOD::Studio::EventInstance* eventInstances[FMODDEBUG_MAX_SNAPSHOTINSTANCE_COUNT];
		event->getInstanceList(eventInstances,FMODDEBUG_MAX_SNAPSHOTINSTANCE_COUNT, &eventInstanceCount);

		char buffer[512];
		int usedBufferCount = 0;
		event->getPath(buffer, 512, &usedBufferCount);

		FString path = buffer;
		path = path.TrimEnd();
			
		UE_LOG(LogTemp, Error,TEXT("%s: %i"), *path ,eventInstanceCount);
	}
}

These are basically equivalent as fart as I can tell, but I wanted to make sure this would return the same results anyway.

As far as I can tell from my own testing, it’s not possible to tell through the API which snapshots are active if they are being triggered as snapshot instruments. This information is certainly available as you can see active snapshots triggered as snapshot instruments when using the Live Update profiler, but I don’t believe it’s exposed in the API. I will double check with the development team and raise a feature request if needs be.

Thanks, for the answer. I will tell my team that they need to use the Live Update Profiler for this for the time being. This was what prompted the question anyway, since we realized they show up in the Live Update Debugger but could not be accessed otherwise from the API.