# 如何在Blutility中去Cast一个蓝图类

**URL:** <https://forums.unrealengine.com/t/blutility-cast/471851>\
**Category:** Blueprint\
**Tags:** Blueprint-Utilities, Blutilities, unreal-engine, question\
**Created:** [September 24, 2020, 6:44am UTC](https://forums.unrealengine.com/t/blutility-cast/471851 "2020-09-24T06:44:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yi.zeng](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yi.zeng](https://forums.unrealengine.com/u/yi.zeng)\
**Post date:** [September 24, 2020, 6:44am UTC](https://forums.unrealengine.com/t/blutility-cast/471851/1 "2020-09-24T06:44:04Z")

</div>

请看图，我在ContentBrowser里创建了一个继承于Object的蓝图类，设置了一些变量，然后用它创建了一个子类，用于存放一些自定义数据。

当我在Blutility里将子类蓝图资源复制一份出来以后，发现返回的Object Refrence无法Cast成功，无论是子类还是父类都不行，它甚至都不属于我所创建的那个蓝图类的子类，而是属于Blueprint类。所有的Test全都返回失败，请问这是为什么？我要如何将它还原成一个蓝图类的实例？

我觉得这应该是一种比较常见的需求，请问要怎么来实现？

即我定义一个数据结构的容器，我通过Blutility创建出很多继承于它的子类实例作为数据资源来使用。这些数据资源我是会在游戏中动态加载和切换的，当父级数据结构改变时，子级的结构也能相应的改变。

 ![315197-无标题.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/e/e0e15c05ceccdac059b560f711de581f95c7299c.png)

---

<div class="post-metadata">

**Author:** ![designk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@designk](https://forums.unrealengine.com/u/designk)\
**Post date:** [November 9, 2020, 10:10pm UTC](https://forums.unrealengine.com/t/blutility-cast/471851/2 "2020-11-09T22:10:33Z")

</div>

和你一样的问题，发现无法cast to 任意蓝图类
