a.Sharing.ScalabilityPlatform

a.Sharing.ScalabilityPlatform

#Overview

name: a.Sharing.ScalabilityPlatform

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of a.Sharing.ScalabilityPlatform is to control which platform should be used when retrieving per-platform scalability settings for animation sharing. This setting variable is part of the animation system in Unreal Engine 5, specifically for the Animation Sharing feature.

This setting variable is primarily used in the Animation Sharing plugin, which is part of the Unreal Engine’s animation system. The plugin is located in the Developer category, indicating it’s mainly used for development and debugging purposes.

The value of this variable is set through a console variable (CVarAnimSharing_PreviewScalabilityPlatform) defined in the AnimationSharingManager.cpp file. It’s a string variable that can be set to:

  1. An empty string (default), which uses the current platform
  2. The name of a specific platform
  3. The name of a platform group

The associated variable CVarAnimSharing_PreviewScalabilityPlatform directly interacts with a.Sharing.ScalabilityPlatform. They share the same value and purpose.

Developers should be aware that:

  1. This variable is only available in editor builds (#if WITH_EDITOR)
  2. It’s marked as a cheat variable (ECVF_Cheat), meaning it’s intended for testing and debugging, not for use in production builds
  3. Changing this value affects how scalability settings are retrieved, which can impact animation performance and quality

Best practices when using this variable include:

  1. Use it primarily for testing and debugging animation sharing performance across different platforms
  2. Be cautious when setting it to a platform different from the current one, as it may lead to unexpected behavior
  3. Reset it to an empty string when not actively testing to ensure the current platform’s settings are used
  4. Document any findings or issues related to platform-specific scalability settings for the animation sharing system

Regarding the associated variable CVarAnimSharing_PreviewScalabilityPlatform:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Developer/AnimationSharing/Source/AnimationSharing/Private/AnimationSharingManager.cpp:96

Scope: file

Source code excerpt:

#if WITH_EDITOR
static TAutoConsoleVariable<FString> CVarAnimSharing_PreviewScalabilityPlatform(
	TEXT("a.Sharing.ScalabilityPlatform"),
	"",
	TEXT("Controls which platform should be used when retrieving per platform scalability settings.\n")
	TEXT("Empty: Current platform.\n")
	TEXT("Name of Platform\n")
	TEXT("Name of Platform Group\n"),
	ECVF_Cheat);

#Associated Variable and Callsites

This variable is associated with another variable named CVarAnimSharing_PreviewScalabilityPlatform. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Plugins/Developer/AnimationSharing/Source/AnimationSharing/Private/AnimationSharingManager.cpp:95

Scope: file

Source code excerpt:


#if WITH_EDITOR
static TAutoConsoleVariable<FString> CVarAnimSharing_PreviewScalabilityPlatform(
	TEXT("a.Sharing.ScalabilityPlatform"),
	"",
	TEXT("Controls which platform should be used when retrieving per platform scalability settings.\n")
	TEXT("Empty: Current platform.\n")
	TEXT("Name of Platform\n")
	TEXT("Name of Platform Group\n"),

#Loc: <Workspace>/Engine/Plugins/Developer/AnimationSharing/Source/AnimationSharing/Private/AnimationSharingManager.cpp:675

Scope (from outer to inner):

file
function     FName UAnimationSharingManager::GetPlatformName

Source code excerpt:

FName UAnimationSharingManager::GetPlatformName()
{
	const FString PlatformString = CVarAnimSharing_PreviewScalabilityPlatform.GetValueOnAnyThread();
	if (PlatformString.IsEmpty())
	{
		return FName(FPlatformProperties::IniPlatformName());
	}

	FName PlatformNameFromString(*PlatformString);