# \[Solved\] How to typecast TSubclassOf\<\>?

**URL:** <https://forums.unrealengine.com/t/solved-how-to-typecast-tsubclassof/277730>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 21, 2014, 5:22pm UTC](https://forums.unrealengine.com/t/solved-how-to-typecast-tsubclassof/277730 "2014-03-21T17:22:53Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![User-1420270633](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@User-1420270633](https://forums.unrealengine.com/u/User-1420270633)\
**Post date:** [March 21, 2014, 8:33pm UTC](https://forums.unrealengine.com/t/solved-how-to-typecast-tsubclassof/277730/9 "2014-03-21T20:33:41Z")

</div>

That’s because Item is a class and not an instance of AShooterWeapon. See my answer below for full details, but I think you want to use TSubobjectPtr instead of TSubclassOf.

---

_[View the full topic](https://forums.unrealengine.com/t/solved-how-to-typecast-tsubclassof/277730)._
