Overview
ThePointerRef struct represents a reference to an EBX object, which can be either internal (within the same asset) or external (in another asset). It’s a fundamental type used throughout the Frostbite engine for connecting objects together.
Structure
Properties
EbxImportReference
External reference containing FileGuid and ClassGuid for cross-asset references
object
Internal object reference for objects within the same asset
PointerRefType
Indicates whether this is a Null, Internal, or External reference
Constructors
PointerRef(EbxImportReference)
Creates an external pointer reference.EbxImportReference
required
The external reference to wrap
PointerRef(Guid)
Creates a pointer reference from a GUID.Guid
required
The file GUID to reference. Empty GUID creates a null pointer.
PointerRef(object)
Creates an internal pointer reference.object
required
The internal object to reference
Methods
Equals
Compares two PointerRef instances for equality.object
required
The object to compare with
true if both pointers have the same Type and reference the same object/external asset.
GetHashCode
Generates a hash code for the pointer reference.Operators
Equality Operators
Related Types
PointerRefType
Enumeration indicating the type of pointer.EbxImportReference
Structure for external references.Usage Examples
Checking Pointer Type
Resolving External Pointers
Creating Object Links
Best Practices
- Always check
Typebefore accessingInternalorExternalproperties - Use
Guid.Emptyto create null pointers instead of default constructors - External references require both FileGuid and ClassGuid to be valid
- Internal references maintain object identity within the asset’s lifetime