IncludeObjectClassFilters

IncludeObjectClassFilters

#Overview

name: IncludeObjectClassFilters

The value of this variable can be defined or overridden in .ini config files. 5 .ini config files referencing this setting variable.

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of IncludeObjectClassFilters is to define a set of object class filters for transaction synchronization in Unreal Engine’s Concert multi-user collaboration system. It is used to determine which objects should be included in transaction updates when collaborating in a multi-user environment.

This setting variable is primarily used by the Concert Sync Client module, which is part of the Concert multi-user collaboration system in Unreal Engine. It is specifically utilized in the transaction filtering and management processes.

The value of this variable is set in the UConcertSyncConfig class, which is defined in the ConcertSyncCore module. It is a config property, meaning it can be configured through project settings or config files.

IncludeObjectClassFilters interacts with other variables and systems:

  1. It works in conjunction with ExcludeTransactionClassFilters to determine which objects are included or excluded from transaction synchronization.
  2. It is used alongside CVarIgnoreTransactionIncludeFilter, a console variable that can override the include filter behavior.

Developers should be aware of the following when using this variable:

  1. An empty IncludeObjectClassFilters array means all objects are included in transaction synchronization by default.
  2. The filters are applied on a per-object basis within transactions.
  3. It affects the live transaction support for packages in the multi-user collaboration system.

Best practices for using this variable include:

  1. Carefully consider which object classes need to be synchronized to optimize performance and reduce unnecessary network traffic.
  2. Ensure that all necessary object classes for your project’s collaborative features are included in the filters.
  3. Regularly review and update the filters as your project evolves to maintain efficient synchronization.
  4. Be mindful of the interaction between include and exclude filters to avoid unintended synchronization behavior.
  5. Test the synchronization behavior thoroughly after making changes to these filters to ensure desired results.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Config/BaseConcertSyncCore.ini:2, section: [/Script/ConcertSyncCore.ConcertSyncConfig]

Location: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Config/BaseConcertSyncCore.ini:3, section: [/Script/ConcertSyncCore.ConcertSyncConfig]

Location: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Config/BaseConcertSyncCore.ini:4, section: [/Script/ConcertSyncCore.ConcertSyncConfig]

Location: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Config/BaseConcertSyncCore.ini:5, section: [/Script/ConcertSyncCore.ConcertSyncConfig]

Location: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Config/BaseConcertSyncCore.ini:6, section: [/Script/ConcertSyncCore.ConcertSyncConfig]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientTransactionBridge.cpp:180

Scope (from outer to inner):

file
namespace    ConcertClientTransactionBridgeUtil
function     ETransactionFilterResult ApplyTransactionFilters

Source code excerpt:

	// Run our include object filters: if the list is empty or we actively ignore the list then all objects are included,
	// otherwise a filter needs to be matched.
	if (SyncConfig->IncludeObjectClassFilters.Num() == 0 
		|| (CVarIgnoreTransactionIncludeFilter.GetValueOnAnyThread() > 0)
		|| RunTransactionFilters(SyncConfig->IncludeObjectClassFilters, InObject))
	{
		return ETransactionFilterResult::IncludeObject;
	}

	// Otherwise the object is excluded from the transaction
	return ETransactionFilterResult::ExcludeObject;

#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientTransactionManager.cpp:77

Scope (from outer to inner):

file
function     bool FConcertClientTransactionManager::HasLiveTransactionSupport

Source code excerpt:

	const UConcertSyncConfig* SyncConfig = GetDefault<UConcertSyncConfig>();
	// If we have no include object filters everything has live transaction support
	if (SyncConfig->IncludeObjectClassFilters.Num() == 0)
	{
		return true;
	}

	// validate that one of the package top level object is one of the allowed outer for the include filters
	for (const FTransactionClassFilter& TransactionFilter : SyncConfig->IncludeObjectClassFilters)
	{
		UClass* TransactionOuterClass = TransactionFilter.ObjectOuterClass.TryLoadClass<UObject>();
		if (TransactionOuterClass && FindObjectWithOuter(InPackage, TransactionOuterClass))
		{
			return true;
		}

#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Public/ConcertSyncSettings.h:87

Scope (from outer to inner):

file
class        class UConcertSyncConfig : public UObject

Source code excerpt:

	 */
	UPROPERTY(config, EditAnywhere, Category="Transaction Settings")
	TArray<FTransactionClassFilter> IncludeObjectClassFilters;

	/**
	 * Array of additional Transaction class filter.
	 * Objects that matches those filters, will prevent the whole transaction from propagation.
	 * @note These filters takes precedence over the IncludeObjectClassFilters
	 */
	UPROPERTY(config, EditAnywhere, Category = "Transaction Settings")
	TArray<FTransactionClassFilter> ExcludeTransactionClassFilters;

	/**
	 * Array of transient class properties that we should send transaction updates for even if usually filtered out.
	 */
	UPROPERTY(config, EditAnywhere, Category="Transaction Settings", meta=(AllowedClasses="/Script/CoreUObject.Property"))
	TArray<TFieldPath<FProperty>> AllowedTransientProperties;

#Loc: <Workspace>/Engine/Plugins/Experimental/CineCameraRigs/Source/CineCameraRigs/Private/CineCameraRigs.cpp:18

Scope (from outer to inner):

file
function     void FCineCameraRigsModule::StartupModule

Source code excerpt:

	{ 
		const FSoftClassPath MetadataClassPath = FSoftClassPath(TEXT("/Script/CineCameraRigs.CineSplineMetadata"));
		const bool bIncluded = Algo::AnyOf(SyncConfig->IncludeObjectClassFilters, [MetadataClassPath](const FTransactionClassFilter& Filter)
			{
				return Filter.ObjectClasses.Contains(MetadataClassPath);
			});

		if (!bIncluded)
		{

#Loc: <Workspace>/Engine/Plugins/Experimental/CineCameraRigs/Source/CineCameraRigs/Private/CineCameraRigs.cpp:28

Scope (from outer to inner):

file
function     void FCineCameraRigsModule::StartupModule

Source code excerpt:

			Filter.ObjectOuterClass = FSoftClassPath(TEXT("/Script/Engine.World"));
			Filter.ObjectClasses.Add(MetadataClassPath);
			SyncConfig->IncludeObjectClassFilters.Add(Filter);
		}

	}
}

void FCineCameraRigsModule::ShutdownModule()