RealDocs

UE_SOFTOBJECTPATH_FSTRING_DEPRECATED

function CoreUObject Since 5.6
#include "UObject/SoftObjectPath.h"
Access: public

Description

A gating macro that controls whether FSoftObjectPath's wide-string-subpath overloads emit UE_DEPRECATED compiler warnings. Currently defined to a no-op, suppressing warnings while the migration from FString to FUtf8String subpaths is in progress.

Caveats & Gotchas

  • • Because this macro currently expands to nothing, overloads marked with it compile silently with no deprecation diagnostic. You will not receive a compiler warning even though Epic intends to remove these overloads — migrate to FUtf8String sub-paths proactively.
  • • When Epic re-enables the macro in a future release, every call site that still passes a wide-string subpath will produce compile errors simultaneously across the entire project.

Signature

#define UE_SOFTOBJECTPATH_FSTRING_DEPRECATED(Version, Message) /*UE_DEPRECATED(Version, Message)*/

Parameters

Name Type Description Default
Version string literal The UE version string at which the deprecation was declared. —
Message string literal The deprecation message that would be shown when the macro is active. —

Example

Migrating to the preferred UTF-8 subpath form C++
// Deprecated (silently accepted today, will break in a future UE version):
FSoftObjectPath OldPath(AssetPath, WideSubPath);

// Preferred — use FUtf8String subpath:
FSoftObjectPath NewPath(AssetPath, FUtf8String("Components.StaticMeshComp"));

Version History

Introduced in: 5.6

Version Status Notes
5.6 stable —

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.