# The real problem of blueprint CastTo

**URL:** <https://forums.unrealengine.com/t/the-real-problem-of-blueprint-castto/1185057>\
**Category:** Programming & Scripting\
**Tags:** Optimization, unreal-engine, Performance, Blueprint, question, CPP\
**Created:** [May 31, 2023, 11:34pm UTC](https://forums.unrealengine.com/t/the-real-problem-of-blueprint-castto/1185057 "2023-05-31T23:34:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [June 1, 2023, 2:28am UTC](https://forums.unrealengine.com/t/the-real-problem-of-blueprint-castto/1185057/3 "2023-06-01T02:28:06Z")

</div>

To add a bit: [Does 'Resolving' a Soft Class Reference to 'Get Class Defaults' Create a Hard Reference? - #11 by SVR33](https://forums.unrealengine.com/t/does-resolving-a-soft-class-reference-to-get-class-defaults-create-a-hard-reference/631987/11)

> [@nephier](#):
>
> “Avoid casting in blueprint. Use interfaces”

Casting to a base class and even components are also viable options IMO.

Think this is a good read with more references to keep digging: [Unreal Engine C++ Complete Guide - Tom Looman](https://www.tomlooman.com/unreal-engine-cpp-guide/#Forward_Declaring_Classes)

* * *

> [@Roy\_Wierer.Seda145](#):
>
> even disconnected nodes, will count as a “hard reference / dependency” which will be loaded into memory

This is true!

---

_[View the full topic](https://forums.unrealengine.com/t/the-real-problem-of-blueprint-castto/1185057)._
