# \[UE5\] Migrating raw pointers to TObjectPtr. UFunction not supported...

**URL:** <https://forums.unrealengine.com/t/ue5-migrating-raw-pointers-to-tobjectptr-ufunction-not-supported/1133895>\
**Category:** C++\
**Tags:** migration, compiling, unreal-engine, Engine-Source-Code, documentation, bug-report, editor, Blueprint, question, CPP\
**Created:** [April 19, 2023, 10:08pm UTC](https://forums.unrealengine.com/t/ue5-migrating-raw-pointers-to-tobjectptr-ufunction-not-supported/1133895 "2023-04-19T22:08:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 19, 2023, 10:08pm UTC](https://forums.unrealengine.com/t/ue5-migrating-raw-pointers-to-tobjectptr-ufunction-not-supported/1133895/1 "2023-04-19T22:08:32Z")

</div>

First off, what were they thinking with UnrealObjectPtrTool.  
0 actual documentation on the migration guide about usage and command parameters.

> [Unreal Engine 5 Migration Guide | Unreal Engine 5.0 Documentation](https://docs.unrealengine.com/5.0/en-US/unreal-engine-5-migration-guide/)

Figured I just migrate the raw pointers myself with a simple Regex:  
In: ([\s\t\<(])([UA].[^\s^\t^:^(^\<]\*)\*  
Out: $1TObjectPtr\<$2\>

In: class\s?TObjectPtr  
Out: TObjectPtr

All good, about 1700 replaced. Leaves me with only 300 “UFunction can not take TObjectPtr as a parameter.”

 ![afbeelding](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/0/8d0bc1638dd7d9f28a6966a4a9903fec28ffa778.png)

Well then, why bother 🤣 🤣
