# \#cast

**URL:** https://forums.unrealengine.com/tag/cast/1983.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [Help needed: How does Cast to actually behave dynamically here? \[SOLVED\]](https://forums.unrealengine.com/t/help-needed-how-does-cast-to-actually-behave-dynamically-here-solved/2818882)

<div class="topic-metadata">

**Author:** [@Alex\_Obtain](https://forums.unrealengine.com/u/Alex_Obtain)\
**Replies:** 4\
**Last updated:** [September 19, 2026, 5:57am UTC](https://forums.unrealengine.com/t/help-needed-how-does-cast-to-actually-behave-dynamically-here-solved/2818882 "2026-09-19T05:57:31Z")

</div>

Hey everyone! I have a small minimap blueprint setup that works great, but I put it together mostly by trial and error, and now I’m trying to actually understand how it works under the hood. So, the core question: Wh…

---

## [An error when casting ](https://forums.unrealengine.com/t/an-error-when-casting/2501342)

<div class="topic-metadata">

**Author:** [@TheSovietArmy](https://forums.unrealengine.com/u/TheSovietArmy)\
**Replies:** 3\
**Last updated:** [May 11, 2025, 8:55am UTC](https://forums.unrealengine.com/t/an-error-when-casting/2501342 "2025-05-11T08:55:21Z")

</div>

I was following this tutorial to help create some AI pathfinding using C++, and despite the tutorial being made in UE4 and my project using UE5.4, it has been the only tutorial I have found helpful for what I want to do …

---

## [Casting Successful, But Error Shows When Using the "As" Pin](https://forums.unrealengine.com/t/casting-successful-but-error-shows-when-using-the-as-pin/2152036)

<div class="topic-metadata">

**Author:** [@Maximum.Dino](https://forums.unrealengine.com/u/Maximum.Dino)\
**Replies:** 9\
**Last updated:** [November 28, 2024, 4:07pm UTC](https://forums.unrealengine.com/t/casting-successful-but-error-shows-when-using-the-as-pin/2152036 "2024-11-28T16:07:46Z")

</div>

I’m working on an inventory system and all has been going well, I’m following a tutorial basically to a tee, but I’m getting an error that seems to be saying that it can’t the ‘As BP\_Item’ is inaccessible, ‘pending kill …

---

## [I've Casted to An AI Character's parent, "Cast to Character." What is the object reference for that?](https://forums.unrealengine.com/t/ive-casted-to-an-ai-characters-parent-cast-to-character-what-is-the-object-reference-for-that/2122344)

<div class="topic-metadata">

**Author:** [@Maximum.Dino](https://forums.unrealengine.com/u/Maximum.Dino)\
**Replies:** 8\
**Last updated:** [November 14, 2024, 1:54pm UTC](https://forums.unrealengine.com/t/ive-casted-to-an-ai-characters-parent-cast-to-character-what-is-the-object-reference-for-that/2122344 "2024-11-14T13:54:22Z")

</div>

I need to cast to an AI Character. It’s parent class/object is “Character.” Now, it says it’s valid for the character to cast to the Ai Character, but I have no idea what to use for the object reference for the “Cast to …

---

## [How to Cast to Behavior Tree Task?](https://forums.unrealengine.com/t/how-to-cast-to-behavior-tree-task/2115976)

<div class="topic-metadata">

**Author:** [@Maximum.Dino](https://forums.unrealengine.com/u/Maximum.Dino)\
**Replies:** 3\
**Last updated:** [November 13, 2024, 4:40am UTC](https://forums.unrealengine.com/t/how-to-cast-to-behavior-tree-task/2115976 "2024-11-13T04:40:50Z")

</div>

I have been trying for a very long time to cast to a task within a behavior tree from a UI widget. I am not sure what to use as my object reference for the task. The parent to the task is the BTTask Blueprint Base, but I…

---

## [Why C++ casting is more efficient (for memory) and blueprint casting - NOT?](https://forums.unrealengine.com/t/why-c-casting-is-more-efficient-for-memory-and-blueprint-casting-not/2059434)

<div class="topic-metadata">

**Author:** [@Wisewalker](https://forums.unrealengine.com/u/Wisewalker)\
**Replies:** 8\
**Last updated:** [October 9, 2024, 11:32pm UTC](https://forums.unrealengine.com/t/why-c-casting-is-more-efficient-for-memory-and-blueprint-casting-not/2059434 "2024-10-09T23:32:19Z")

</div>

Hello! Recently I have been reading a lot about the performance problems related to blueprint casting (i.e. in BPs using nodes ‘cast to’, ‘get all actors of class’, ‘get actor of class’ etc. results in creating hard refe…

---

## [In the Animation Blueprint, the Pawn obtained using the TryToGetPawnOwner node cannot be cast to a subclass of Character.](https://forums.unrealengine.com/t/in-the-animation-blueprint-the-pawn-obtained-using-the-trytogetpawnowner-node-cannot-be-cast-to-a-subclass-of-character/2022169)

<div class="topic-metadata">

**Author:** [@Soldhum\_Soon](https://forums.unrealengine.com/u/Soldhum_Soon)\
**Replies:** 1\
**Last updated:** [September 15, 2024, 7:25pm UTC](https://forums.unrealengine.com/t/in-the-animation-blueprint-the-pawn-obtained-using-the-trytogetpawnowner-node-cannot-be-cast-to-a-subclass-of-character/2022169 "2024-09-15T19:25:25Z")

</div>

UE5.4.1 I have a CharacterStage that inherits from Character. In the Animation Blueprint, the Pawn obtained using TryToGetPawnOwner always fails when using Cast To CharacterStage.

---

## [Better way to do this instead of just casting to all objects to see wich one is the right one?](https://forums.unrealengine.com/t/better-way-to-do-this-instead-of-just-casting-to-all-objects-to-see-wich-one-is-the-right-one/1906124)

<div class="topic-metadata">

**Author:** [@DonJuan1232](https://forums.unrealengine.com/u/DonJuan1232)\
**Replies:** 3\
**Last updated:** [June 17, 2024, 1:38pm UTC](https://forums.unrealengine.com/t/better-way-to-do-this-instead-of-just-casting-to-all-objects-to-see-wich-one-is-the-right-one/1906124 "2024-06-17T13:38:30Z")

</div>

So when I drop an object out of my inventory I want to set the usage ammount to the new spawned object. but since I am going to have a lot of objects I want to do it a better and efficient way. Now I am just checking wha…

---

## [How do I do this without casting to my animation blueprint?](https://forums.unrealengine.com/t/how-do-i-do-this-without-casting-to-my-animation-blueprint/1874064)

<div class="topic-metadata">

**Author:** [@dabbbbbbbb5656](https://forums.unrealengine.com/u/dabbbbbbbb5656)\
**Replies:** 4\
**Last updated:** [May 26, 2024, 6:44pm UTC](https://forums.unrealengine.com/t/how-do-i-do-this-without-casting-to-my-animation-blueprint/1874064 "2024-05-26T18:44:48Z")

</div>

I was watching a tutorial on the mistakes that beginners make, and it was about using event dispatchers instead of casting. Here in my animation blueprint, I’m calling my event dispatcher when my custom anim notify happ…

---

## [Casting to child blueprint](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450)

<div class="topic-metadata">

**Author:** [@samhall1995](https://forums.unrealengine.com/u/samhall1995)\
**Replies:** 2\
**Last updated:** [April 22, 2024, 1:38pm UTC](https://forums.unrealengine.com/t/casting-to-child-blueprint/1815450 "2024-04-22T13:38:04Z")

</div>

Hi everyone I’ve been trying for a couple weeks to get the information of a weapon but no matter what i try it always comes back with a “Accessed none” error and its driving me mad. It seems like this should work but I’…

---

## [Save Game in c++ ue5](https://forums.unrealengine.com/t/save-game-in-c-ue5/1439075)

<div class="topic-metadata">

**Author:** [@Online\_Learner\_2GVso](https://forums.unrealengine.com/u/Online_Learner_2GVso)\
**Replies:** 1\
**Last updated:** [November 30, 2023, 5:48pm UTC](https://forums.unrealengine.com/t/save-game-in-c-ue5/1439075 "2023-11-30T17:48:14Z")

</div>

---

## [Cannot cast from float2 to float3](https://forums.unrealengine.com/t/cannot-cast-from-float2-to-float3/483461)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_bd3869761](https://forums.unrealengine.com/u/anonymous_user_bd3869761)\
**Replies:** 7\
**Last updated:** [April 21, 2023, 11:46am UTC](https://forums.unrealengine.com/t/cannot-cast-from-float2-to-float3/483461 "2023-04-21T11:46:51Z")

</div>

I’m getting a warning about an function I have created.

---

## [Avoid CAST? Alternative?](https://forums.unrealengine.com/t/avoid-cast-alternative/795126)

<div class="topic-metadata">

**Author:** [@BakuryuReitoken](https://forums.unrealengine.com/u/BakuryuReitoken)\
**Replies:** 24\
**Last updated:** [March 20, 2023, 11:17pm UTC](https://forums.unrealengine.com/t/avoid-cast-alternative/795126 "2023-03-20T23:17:51Z")

</div>

Hello, Lots of YouTubers said to avoid to CAST object for performances. Do you have some alternative? to avoid cast? some tips to share? Thanks in advance.

---

## [Cast always fails for inheritance](https://forums.unrealengine.com/t/cast-always-fails-for-inheritance/354620)

<div class="topic-metadata">

**Author:** [@Napoleonite](https://forums.unrealengine.com/u/Napoleonite)\
**Replies:** 8\
**Last updated:** [March 19, 2023, 8:12pm UTC](https://forums.unrealengine.com/t/cast-always-fails-for-inheritance/354620 "2023-03-19T20:12:33Z")

</div>

As seen in the picture below PlayerCharacterBP DOES inherit from BaseCharacter\_BP. I also use it’s functions and variables so this is a bit strange. I found this post from 4.10: https://answers.unrealengine.com/question…

---

## [Cast to Anim \_BP in an Actor\_BP](https://forums.unrealengine.com/t/cast-to-anim-bp-in-an-actor-bp/777452)

<div class="topic-metadata">

**Author:** [@Wadjidjo](https://forums.unrealengine.com/u/Wadjidjo)\
**Replies:** 2\
**Last updated:** [February 24, 2023, 2:10pm UTC](https://forums.unrealengine.com/t/cast-to-anim-bp-in-an-actor-bp/777452 "2023-02-24T14:10:25Z")

</div>

Hello, i’m trying to do when the player hit an actor\_BP (which is a trigger box) it cast to the agentAnim\_BP but i don’t know what i need to link with the objet. Thanks for your help. :slightly\_smiling\_face:

---

## [Kill mechanic problem](https://forums.unrealengine.com/t/kill-mechanic-problem/565203)

<div class="topic-metadata">

**Author:** [@GameExp](https://forums.unrealengine.com/u/GameExp)\
**Replies:** 16\
**Last updated:** [May 27, 2022, 4:33pm UTC](https://forums.unrealengine.com/t/kill-mechanic-problem/565203 "2022-05-27T16:33:27Z")

</div>

The idea is that the player presses the kill button (Q) and the closest player dies. But my cast: 1. Roles: Server - victim; Client - killer. Action: Client removes its widgets, Client sees server dying animation, N…

---

## [Engine cast returns null](https://forums.unrealengine.com/t/engine-cast-returns-null/439125)

<div class="topic-metadata">

**Author:** [@mastercookerYT](https://forums.unrealengine.com/u/mastercookerYT)\
**Replies:** 3\
**Last updated:** [April 27, 2022, 6:37pm UTC](https://forums.unrealengine.com/t/engine-cast-returns-null/439125 "2022-04-27T18:37:43Z")

</div>

I am trying to use the following code as a callback lambda: auto notificationClicked = \[\](const FGeometry&, const FPointerEvent&) -\> FReply { GEngine-\>AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT("Notifica…

---

## [ソフト参照でロードしたObjectのCastが失敗する](https://forums.unrealengine.com/t/object-cast/506380)

<div class="topic-metadata">

**Author:** [@SnelDev](https://forums.unrealengine.com/u/SnelDev)\
**Replies:** 4\
**Last updated:** [March 13, 2022, 12:23pm UTC](https://forums.unrealengine.com/t/object-cast/506380 "2022-03-13T12:23:36Z")

</div>

お世話になっております。 ソフト参照でウィジェットをロードし、普通のウィジェットと同じくAdd to Viewport等で利用しようとしています。Async Load AssetからアウトプットされたObjectをCastしたいのですが、Castが失敗してしまい、Nullとなってしまいます。こちらの理由と解決策について、ご教授頂けますでしょうか？

---

## [So how do i make my Animation BP inherit from character actor?](https://forums.unrealengine.com/t/so-how-do-i-make-my-animation-bp-inherit-from-character-actor/475618)

<div class="topic-metadata">

**Author:** [@MoistimusPrime](https://forums.unrealengine.com/u/MoistimusPrime)\
**Replies:** 5\
**Last updated:** [November 3, 2021, 6:28pm UTC](https://forums.unrealengine.com/t/so-how-do-i-make-my-animation-bp-inherit-from-character-actor/475618 "2021-11-03T18:28:07Z")

</div>

I am relatively new to ue4 and I just started to cast variables between BP but I am having trouble when trying to change variable in my Anim BP from my Character BP. This is the error message that I get. How do fix this? …

---

## [Getting Actor of FProperty instance](https://forums.unrealengine.com/t/getting-actor-of-fproperty-instance/485680)

<div class="topic-metadata">

**Author:** [@jojothebandit](https://forums.unrealengine.com/u/jojothebandit)\
**Replies:** 1\
**Last updated:** [July 2, 2021, 4:18pm UTC](https://forums.unrealengine.com/t/getting-actor-of-fproperty-instance/485680 "2021-07-02T16:18:53Z")

</div>

Hello, If I have an cpp component I can easily get the actor “i am in” with GetOwner() But if I’m in plugin code, and have an Insance of a FProperty from some actor, it doesn’t seem I can get the actor instance in any…

---

## [(theoretically) valid cast failed](https://forums.unrealengine.com/t/theoretically-valid-cast-failed/483184)

<div class="topic-metadata">

**Author:** [@Xilef\_HD](https://forums.unrealengine.com/u/Xilef_HD)\
**Replies:** 3\
**Last updated:** [May 13, 2021, 5:31pm UTC](https://forums.unrealengine.com/t/theoretically-valid-cast-failed/483184 "2021-05-13T17:31:08Z")

</div>

So basically I am trying to load a widget from an UGC package. But when I try to cast the widgetclass to its superclass, the cast just returns NULL. relevant cpp code excerpt: for (FUGCPackage& package : UGCRegistry-\>U…

---

## [Engine crashes while using Interface](https://forums.unrealengine.com/t/engine-crashes-while-using-interface/482391)

<div class="topic-metadata">

**Author:** [@M.AbdullahSultan](https://forums.unrealengine.com/u/M.AbdullahSultan)\
**Replies:** 2\
**Last updated:** [April 24, 2021, 12:13pm UTC](https://forums.unrealengine.com/t/engine-crashes-while-using-interface/482391 "2021-04-24T12:13:45Z")

</div>

A mail bride or higher often called mail order https://latin-dating.org/ brides has really taken off lately. Dating Russian girls occasionally implies investing not merely cash assets, in order to maintain her close to y…

---

## [Payload cast](https://forums.unrealengine.com/t/payload-cast/481188)

<div class="topic-metadata">

**Author:** [@Kunal\_Singh\_24](https://forums.unrealengine.com/u/Kunal_Singh_24)\
**Replies:** 0\
**Last updated:** [April 1, 2021, 7:10am UTC](https://forums.unrealengine.com/t/payload-cast/481188 "2021-04-01T07:10:21Z")

</div>

Hello… Please help me fast on this one… I want to convert this part shown in the image into code. Cast drag drop operation Casting a widget from payload Remember I want to use cast( i don’t want to use create widget) …

---

## [How do you set bCastDynamicShadow to False? (asked 4 years ago w/ 0 replies)](https://forums.unrealengine.com/t/how-do-you-set-bcastdynamicshadow-to-false-asked-4-years-ago-w-0-replies/481143)

<div class="topic-metadata">

**Author:** [@NextWorldVR](https://forums.unrealengine.com/u/NextWorldVR)\
**Replies:** 0\
**Last updated:** [March 31, 2021, 3:09am UTC](https://forums.unrealengine.com/t/how-do-you-set-bcastdynamicshadow-to-false-asked-4-years-ago-w-0-replies/481143 "2021-03-31T03:09:10Z")

</div>

How do you set bCastDynamicShadow to False? this was asked like 4 years ago,. Not a single person took the time to answer. If you answer here (lol LOL Good one right?) maybe pop over and tell them too, I bet they …

---

## [Get Player Controller from inside Game Instance?](https://forums.unrealengine.com/t/get-player-controller-from-inside-game-instance/479913)

<div class="topic-metadata">

**Author:** [@schmigel](https://forums.unrealengine.com/u/schmigel)\
**Replies:** 3\
**Last updated:** [March 8, 2021, 3:26pm UTC](https://forums.unrealengine.com/t/get-player-controller-from-inside-game-instance/479913 "2021-03-08T15:26:25Z")

</div>

Hi everyone! I’m trying to cast to my Player Controller inside the Init() in the Game Instance. The thing it always fails. The PController is APCBase, and it’s already defined as the default controller. Like this: AP…

---

## [Collision to enter new level is failing cast to save data](https://forums.unrealengine.com/t/collision-to-enter-new-level-is-failing-cast-to-save-data/479421)

<div class="topic-metadata">

**Author:** [@ScoptOriginal](https://forums.unrealengine.com/u/ScoptOriginal)\
**Replies:** 3\
**Last updated:** [February 25, 2021, 8:49pm UTC](https://forums.unrealengine.com/t/collision-to-enter-new-level-is-failing-cast-to-save-data/479421 "2021-02-25T20:49:16Z")

</div>

I have a system in place to delete the previous level’s checkpoint save game and transport the player to the next level while saving their score, and it has worked fine for 9 levels, but I checked it with print string…

---

## [Error Casting UObject\* to user createdsubclass of APawn\*](https://forums.unrealengine.com/t/error-casting-uobject-to-user-createdsubclass-of-apawn/478571)

<div class="topic-metadata">

**Author:** [@ilovegoodfood](https://forums.unrealengine.com/u/ilovegoodfood)\
**Replies:** 1\
**Last updated:** [February 12, 2021, 12:12pm UTC](https://forums.unrealengine.com/t/error-casting-uobject-to-user-createdsubclass-of-apawn/478571 "2021-02-12T12:12:48Z")

</div>

In my tower-defence project I have a class for Stats that extends UObject. These stats can exist within outer objects of at least three different types; ABasePawn (directly extends APawn and is the core class for all tow…

---

## [Hey, clarification casting fails from character to movement component](https://forums.unrealengine.com/t/hey-clarification-casting-fails-from-character-to-movement-component/478037)

<div class="topic-metadata">

**Author:** [@Barbo6.9](https://forums.unrealengine.com/u/Barbo6.9)\
**Replies:** 1\
**Last updated:** [January 31, 2021, 4:46am UTC](https://forums.unrealengine.com/t/hey-clarification-casting-fails-from-character-to-movement-component/478037 "2021-01-31T04:46:23Z")

</div>

Hey, apologies for the confusion I figured it out. For anyone wanting the solution, you don’t need to cast to character movement component but just the BP\_Character and access the component directly. Casting twice isn’t …

---

## [Broadcast automation](https://forums.unrealengine.com/t/broadcast-automation/476780)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_0588a36d](https://forums.unrealengine.com/u/anonymous_user_0588a36d)\
**Replies:** 0\
**Last updated:** [January 4, 2021, 6:56pm UTC](https://forums.unrealengine.com/t/broadcast-automation/476780 "2021-01-04T18:56:35Z")

</div>

hello everyone . I working on a studio and we had a virtual set , and there’s too many problems with automation , and “simple” things , such as , call other mesh or change the video on video wall , we had a comp and virt…

---

## [Get player character return null in player controller](https://forums.unrealengine.com/t/get-player-character-return-null-in-player-controller/475644)

<div class="topic-metadata">

**Author:** [@Phonicz](https://forums.unrealengine.com/u/Phonicz)\
**Replies:** 1\
**Last updated:** [December 9, 2020, 6:45pm UTC](https://forums.unrealengine.com/t/get-player-character-return-null-in-player-controller/475644 "2020-12-09T18:45:36Z")

</div>

For some odd reason when I try to get player character to cast to my player in the player controller and set a ref, it returns null and the cast fails even though my characters parent class is “Character”. This happe…

[Next page](https://forums.unrealengine.com/tag/cast/1983.md?match_all_tags=true&page=1&tags%5B%5D=cast)
