FName
Namespace: UAssetAPI.UnrealTypes
Unreal name - consists of an FString (which is serialized as an index in the name map) and an instance number
public class FName : System.ICloneable
Inheritance Object → FName
Implements ICloneable
Fields
Number
Instance number.
public int Number;
Type
The type of this FName; i.e. whether it points to a package-level name table, container-level name table, or global name table. This value is always EMappedNameType.Package for non-Zen assets.
public EMappedNameType Type;
Asset
The asset that this FName is bound to.
public INameMap Asset;
Properties
Value
public FString Value { get; set; }
Property Value
IsDummy
public bool IsDummy { get; }
Property Value
IsGlobal
Does this FName point into the global name table? This value is always false for non-Zen assets.
public bool IsGlobal { get; }
Property Value
Constructors
FName(INameMap, String, Int32)
Creates a new FName instance.
public FName(INameMap asset, string value, int number)
Parameters
asset
INameMap
The asset that this FName is bound to.
value
String
The string literal that the new FName's value will be, verbatim.
number
Int32
The instance number of the new FName.
FName(INameMap, FString, Int32)
Creates a new FName instance.
public FName(INameMap asset, FString value, int number)
Parameters
asset
INameMap
The asset that this FName is bound to.
value
FString
The FString that the FName's value will be, verbatim.
number
Int32
The instance number of the new FName.
FName(INameMap, Int32, Int32)
Creates a new FName instance.
public FName(INameMap asset, int index, int number)
Parameters
asset
INameMap
The asset that this FName is bound to.
index
Int32
The index that this FName's value will be.
number
Int32
The instance number of the new FName.
FName(INameMap)
Creates a new blank FName instance.
public FName(INameMap asset)
Parameters
asset
INameMap
The asset that this FName is bound to.
FName()
Creates a new blank FName instance, with no asset bound to it. An asset must be bound to this FName before setting its value.
public FName()
Methods
ToString()
Converts this FName instance into a human-readable string. This is the inverse of FName.FromString(INameMap, String).
public string ToString()
Returns
String
The human-readable string that represents this FName.
FromStringFragments(INameMap, String, String&, Int32&)
internal static void FromStringFragments(INameMap asset, string val, String& str, Int32& num)
Parameters
asset
INameMap
val
String
str
String&
num
Int32&
IsFromStringValid(INameMap, String)
public static bool IsFromStringValid(INameMap asset, string val)
Parameters
asset
INameMap
val
String
Returns
FromString(INameMap, String)
Converts a human-readable string into an FName instance. This is the inverse of FName.ToString().
public static FName FromString(INameMap asset, string val)
Parameters
asset
INameMap
The asset that the new FName will be bound to.
val
String
The human-readable string to convert into an FName instance.
Returns
FName
An FName instance that this string represents.
Transfer(INameMap)
Creates a new FName with the same string value and number as the current instance but is bound to a different asset.
public FName Transfer(INameMap newAsset)
Parameters
newAsset
INameMap
The asset to bound the new FName to.
Returns
FName
An equivalent FName bound to a different asset.
DefineDummy(INameMap, FString, Int32)
Creates a new dummy FName. This can be used for cases where a valid FName must be produced without referencing a specific asset's name map.
USE WITH CAUTION! UAssetAPI must never attempt to serialize a dummy FName to disk.
public static FName DefineDummy(INameMap asset, FString val, int number)
Parameters
asset
INameMap
The asset that this FName is bound to.
val
FString
The FString that the FName's value will be, verbatim.
number
Int32
The instance number of the new FName.
Returns
FName
A dummy FName instance that represents the string.
DefineDummy(INameMap, String, Int32)
Creates a new dummy FName. This can be used for cases where a valid FName must be produced without referencing a specific asset's name map.
USE WITH CAUTION! UAssetAPI must never attempt to serialize a dummy FName to disk.
public static FName DefineDummy(INameMap asset, string val, int number)
Parameters
asset
INameMap
The asset that this FName is bound to.
val
String
The string literal that the FName's value will be, verbatim.
number
Int32
The instance number of the new FName.
Returns
FName
A dummy FName instance that represents the string.
Equals(Object)
public bool Equals(object obj)
Parameters
obj
Object
Returns
GetHashCode()
public int GetHashCode()
Returns
Clone()
public object Clone()