ai.debug.so.UnregisterAllSmartObjects

ai.debug.so.UnregisterAllSmartObjects

#Overview

name: ai.debug.so.UnregisterAllSmartObjects

This variable is created as a Console Variable (cvar).

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Private/SmartObjectSubsystem.cpp:65

Scope (from outer to inner):

file
namespace    UE::SmartObject
namespace    Debug

Source code excerpt:

		static FAutoConsoleCommandWithWorld UnregisterAllSmartObjectsCmd
		(
			TEXT("ai.debug.so.UnregisterAllSmartObjects"),
			TEXT("Force unregister all objects registered in the subsystem to simulate & debug runtime flows (will ignore already unregistered components)."),
			FConsoleCommandWithWorldDelegate::CreateLambda([](const UWorld* InWorld)
				{
					if (USmartObjectSubsystem* Subsystem = USmartObjectSubsystem::GetCurrent(InWorld))
					{
						Subsystem->DebugUnregisterAllSmartObjects();

#Loc: <Workspace>/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Private/SmartObjectSubsystem.cpp:3036

Scope (from outer to inner):

file
function     void USmartObjectSubsystem::DebugRegisterAllSmartObjects

Source code excerpt:


			// In this debug command we register back components that were already part of the simulation but
			// removed using debug command 'ai.debug.so.UnregisterAllSmartObjects'.
			// We need to find associated collection entry and pass it back so the callbacks can be bound properly
			if (Entry && RuntimeSmartObjects.Find(Entry->GetHandle()) == nullptr)
			{
				AddComponentToSimulation(*Cmp, *Entry);
			}
		}