TTypeContainer::GetInstanceRef

Gets a shared reference to an instance of the specified class.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/TypeContainer.h

Include

#include "Misc/TypeContainer.h"

Syntax

template<class R>
TSharedRef< R, Mode > GetInstanceRef() const

Remarks

Gets a shared reference to an instance of the specified class.

Unlike GetInstance(), this function will assert if no instance was registered for the requested type of class using either RegisterClass() or RegisterInstance().

Parameters

Parameter

Description

R

The type of class that an instance is being requested for.

A

shared pointer to the instance.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss