# C++

**URL:** https://forums.unrealengine.com/c/development-discussion/programming-scripting/c-programming/29.md?page=17

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

**Page:** 18

---

## [\[SOLVED\] How do I get a flashlight effect to work properly with a procedurally generated mesh.](https://forums.unrealengine.com/t/solved-how-do-i-get-a-flashlight-effect-to-work-properly-with-a-procedurally-generated-mesh/2689539)

<div class="topic-metadata">

**Author:** [@JontomXire](https://forums.unrealengine.com/u/JontomXire)\
**Replies:** 4\
**Last updated:** [January 10, 2026, 3:32pm UTC](https://forums.unrealengine.com/t/solved-how-do-i-get-a-flashlight-effect-to-work-properly-with-a-procedurally-generated-mesh/2689539 "2026-01-10T15:32:31Z")

</div>

I have a custom player pawn class which has a spotlight member which acts like a miner’s helmet light. The class member is a USpotLightComponent. I instantiate it in the class constructor like this: m\_light = Create…

---

## [Bug d'affichage de revêtement d'arme  ](https://forums.unrealengine.com/t/bug-daffichage-de-revetement-darme/2690607)

<div class="topic-metadata">

**Author:** [@Spidy\_lulu](https://forums.unrealengine.com/u/Spidy_lulu)\
**Replies:** 0\
**Last updated:** [January 8, 2026, 3:55pm UTC](https://forums.unrealengine.com/t/bug-daffichage-de-revetement-darme/2690607 "2026-01-08T15:55:50Z")

</div>

Bonjour je me permets de vous contacter car le revêtement d’arme marque brûlée a un bug d’affichage, sa me met le revêtement marque enflammé Merci de bien vouloir résoudre se bug s’il vous plaît bonne journée

---

## [Error "DataAsset does not match object's real ID of !"](https://forums.unrealengine.com/t/error-dataasset-does-not-match-objects-real-id-of/738849)

<div class="topic-metadata">

**Author:** [@benjysugi](https://forums.unrealengine.com/u/benjysugi)\
**Replies:** 4\
**Last updated:** [January 8, 2026, 6:10am UTC](https://forums.unrealengine.com/t/error-dataasset-does-not-match-objects-real-id-of/738849 "2026-01-08T06:10:22Z")

</div>

Hi, I’m having an issue with UE4.27 where when I try compile I get the error “DataAsset does not match object’s real ID of !” I’ve been trying for days but I can’t fix it, does anyone know what causes this and how to f…

---

## [Chaos race condition ? ](https://forums.unrealengine.com/t/chaos-race-condition/2690471)

<div class="topic-metadata">

**Author:** [@hugoyu](https://forums.unrealengine.com/u/hugoyu)\
**Replies:** 0\
**Last updated:** [January 8, 2026, 4:26am UTC](https://forums.unrealengine.com/t/chaos-race-condition/2690471 "2026-01-08T04:26:59Z")

</div>

Execution Environment: UE 5.7 with async physics tick on The following code is generally executed on the Game Thread (GT). The issue is that ‘Proxy-\>GetParticle\_LowLevel()’ retrieves ‘Particle’ data for operation, whil…

---

## [Assertion failed: Component && Component-\>IsActive() PhysScene\_Chaos.cpp \[Line: 205\] ](https://forums.unrealengine.com/t/assertion-failed-component-component-isactive-physscene-chaos-cpp-line-205/2690423)

<div class="topic-metadata">

**Author:** [@Tenacious\_Dan](https://forums.unrealengine.com/u/Tenacious_Dan)\
**Replies:** 0\
**Last updated:** [January 7, 2026, 9:56pm UTC](https://forums.unrealengine.com/t/assertion-failed-component-component-isactive-physscene-chaos-cpp-line-205/2690423 "2026-01-07T21:56:20Z")

</div>

Hello, I want to run some physics code on a fixed physics time step for consistency. I tried enabling AsyncPhysicsTick in project settings and in my actor component. However it seems that simply adding the line SetAsyncP…

---

## [I'm try to do the C++ equivalent of Construct object from class in blueprint but doesn't seem to be working.](https://forums.unrealengine.com/t/im-try-to-do-the-c-equivalent-of-construct-object-from-class-in-blueprint-but-doesnt-seem-to-be-working/2688831)

<div class="topic-metadata">

**Author:** [@TheFuriouswc](https://forums.unrealengine.com/u/TheFuriouswc)\
**Replies:** 2\
**Last updated:** [January 7, 2026, 10:06am UTC](https://forums.unrealengine.com/t/im-try-to-do-the-c-equivalent-of-construct-object-from-class-in-blueprint-but-doesnt-seem-to-be-working/2688831 "2026-01-07T10:06:38Z")

</div>

As the title says, I’m trying to construct this object arry, but when I go see if anything was added, it’s reads none and says both properties are invalid. void USpatialInventory::initializeinventory() { AExtractionSh…

---

## [UI Images getting blurry at different screen resolutions](https://forums.unrealengine.com/t/ui-images-getting-blurry-at-different-screen-resolutions/2689973)

<div class="topic-metadata">

**Author:** [@InfamousDuke](https://forums.unrealengine.com/u/InfamousDuke)\
**Replies:** 1\
**Last updated:** [January 6, 2026, 3:07pm UTC](https://forums.unrealengine.com/t/ui-images-getting-blurry-at-different-screen-resolutions/2689973 "2026-01-06T15:07:01Z")

</div>

I’m facing an issue where UI image / texture quality becomes very blurry when playing the game in a small window or at lower resolutions. The textures look fine in fullscreen or at higher resolutions, but they noticeably…

---

## [Is the DynamicMeshComponent's distance field generation option editor-only?](https://forums.unrealengine.com/t/is-the-dynamicmeshcomponents-distance-field-generation-option-editor-only/2244548)

<div class="topic-metadata">

**Author:** [@Elioss44](https://forums.unrealengine.com/u/Elioss44)\
**Replies:** 9\
**Last updated:** [January 5, 2026, 11:03pm UTC](https://forums.unrealengine.com/t/is-the-dynamicmeshcomponents-distance-field-generation-option-editor-only/2244548 "2026-01-05T23:03:10Z")

</div>

When I tried to use it in a packaged build it caused my game to crash. If this is intended behavior, I find it pretty disrespectful that no one had the decency to comment it anywhere or write it in the docs as I spent a …

---

## [FEATURE REQUEST: Incorrect Schema Validation in UStateTreeComponent's Override Functions](https://forums.unrealengine.com/t/feature-request-incorrect-schema-validation-in-ustatetreecomponents-override-functions/2588875)

<div class="topic-metadata">

**Author:** [@extremetaira](https://forums.unrealengine.com/u/extremetaira)\
**Replies:** 3\
**Last updated:** [January 5, 2026, 1:54pm UTC](https://forums.unrealengine.com/t/feature-request-incorrect-schema-validation-in-ustatetreecomponents-override-functions/2588875 "2026-01-05T13:54:51Z")

</div>

Summary: The schema validation logic in UStateTreeComponent::SetLinkedStateTreeOverrides and UStateTreeComponent::AddLinkedStateTreeOverrides is inverted compared to the documented intent in the comments. This causes th…

---

## [Still worth supporting Intel Macs when building a plugin that uses Third-Party Libraries?](https://forums.unrealengine.com/t/still-worth-supporting-intel-macs-when-building-a-plugin-that-uses-third-party-libraries/2689666)

<div class="topic-metadata">

**Author:** [@OrbitalZones](https://forums.unrealengine.com/u/OrbitalZones)\
**Replies:** 1\
**Last updated:** [January 5, 2026, 6:57am UTC](https://forums.unrealengine.com/t/still-worth-supporting-intel-macs-when-building-a-plugin-that-uses-third-party-libraries/2689666 "2026-01-05T06:57:29Z")

</div>

I am currently working on a code plugin that uses a third-party library and wondering whether it still makes sense to compile this library for Apple Macs with an Intel CPU, in order to make my plugin compatible with olde…

---

## [Spawn Actor does not spawn an actor from a widget in C++](https://forums.unrealengine.com/t/spawn-actor-does-not-spawn-an-actor-from-a-widget-in-c/2689473)

<div class="topic-metadata">

**Author:** [@AbdulVandamFBI](https://forums.unrealengine.com/u/AbdulVandamFBI)\
**Replies:** 1\
**Last updated:** [January 4, 2026, 3:06am UTC](https://forums.unrealengine.com/t/spawn-actor-does-not-spawn-an-actor-from-a-widget-in-c/2689473 "2026-01-04T03:06:52Z")

</div>

Hi, I have a problem. I’m trying to spawn an actor from a widget for preview inside the widget. If I do it with the Spawn Actor From Class node, everything is created perfectly. But in C++ there are problems: when I try …

---

## [How to set controller desired rotation in gasp ](https://forums.unrealengine.com/t/how-to-set-controller-desired-rotation-in-gasp/2689449)

<div class="topic-metadata">

**Author:** [@IAG\_Asur](https://forums.unrealengine.com/u/IAG_Asur)\
**Replies:** 0\
**Last updated:** [January 3, 2026, 9:59pm UTC](https://forums.unrealengine.com/t/how-to-set-controller-desired-rotation-in-gasp/2689449 "2026-01-03T21:59:58Z")

</div>

I am using the game animation sample project and i want to use the controller desire rotation the way we have it the third person template like our character faces only to the camera, i want it here in the game animation…

---

## [Enhanced Input with UserWidget in UE 5.7](https://forums.unrealengine.com/t/enhanced-input-with-userwidget-in-ue-5-7/2686951)

<div class="topic-metadata">

**Author:** [@shue\_it](https://forums.unrealengine.com/u/shue_it)\
**Replies:** 1\
**Last updated:** [January 2, 2026, 4:06pm UTC](https://forums.unrealengine.com/t/enhanced-input-with-userwidget-in-ue-5-7/2686951 "2026-01-02T16:06:04Z")

</div>

Hello there I would need some help regarding Enhanced Input in UserWidget :upside\_down\_face: I need to handle some inputs via Enhanced Input in my UI (UserWidget), but by upgrading my project to the latest Unreal Engin…

---

## [How do I disable the parental controls required by AI?](https://forums.unrealengine.com/t/how-do-i-disable-the-parental-controls-required-by-ai/2676344)

<div class="topic-metadata">

**Author:** [@pio57019](https://forums.unrealengine.com/u/pio57019)\
**Replies:** 7\
**Last updated:** [January 2, 2026, 3:46pm UTC](https://forums.unrealengine.com/t/how-do-i-disable-the-parental-controls-required-by-ai/2676344 "2026-01-02T15:46:55Z")

</div>

I just opened the editor and tried to use the AI feature to ask it a question — and it told me to turn off parental controls??? I’m over 30 years old — I’m not a kid, I’m literally a developer! Why on earth do I need pa…

---

## [Mass Representation -\> Actor Spawning](https://forums.unrealengine.com/t/mass-representation-actor-spawning/2688649)

<div class="topic-metadata">

**Author:** [@HGEdrachen](https://forums.unrealengine.com/u/HGEdrachen)\
**Replies:** 3\
**Last updated:** [January 1, 2026, 8:41pm UTC](https://forums.unrealengine.com/t/mass-representation-actor-spawning/2688649 "2026-01-01T20:41:41Z")

</div>

how to initialize the existing mass representation processor to spawn requested actors ?… void UControlProcessor::Execute(FMassEntityManager& EntityManager, FMassExecutionContext& Context){// Einfacher Zugriff - sucht…

---

## [How do I create a capsule for a animal (ex. wolf) character?](https://forums.unrealengine.com/t/how-do-i-create-a-capsule-for-a-animal-ex-wolf-character/299999)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_a7d9c852](https://forums.unrealengine.com/u/anonymous_user_a7d9c852)\
**Replies:** 43\
**Last updated:** [December 31, 2025, 11:57pm UTC](https://forums.unrealengine.com/t/how-do-i-create-a-capsule-for-a-animal-ex-wolf-character/299999 "2025-12-31T23:57:09Z")

</div>

Hey Guys, I just started to work on our new, in which a wolf plays the main character. This is kind of tricky, because the wolf doesnt really fit into a the vertical capsule. We are now thinking to have two horizontal c…

---

## [Slate inheritence: How?](https://forums.unrealengine.com/t/slate-inheritence-how/2688829)

<div class="topic-metadata">

**Author:** [@Kotaru\_1](https://forums.unrealengine.com/u/Kotaru_1)\
**Replies:** 1\
**Last updated:** [December 31, 2025, 10:31pm UTC](https://forums.unrealengine.com/t/slate-inheritence-how/2688829 "2025-12-31T22:31:43Z")

</div>

Okay I’m trying to inherit from SButton and UButton, but for the life of me cannot figure out how to inherit the slate properties to be accessible in the subclass’ FArguments. Some in Engine examples seem to pull it off …

---

## [Are there memory leakings when using media player in Unreal Engine?](https://forums.unrealengine.com/t/are-there-memory-leakings-when-using-media-player-in-unreal-engine/2672645)

<div class="topic-metadata">

**Author:** [@Yuri9447](https://forums.unrealengine.com/u/Yuri9447)\
**Replies:** 4\
**Last updated:** [December 31, 2025, 1:16am UTC](https://forums.unrealengine.com/t/are-there-memory-leakings-when-using-media-player-in-unreal-engine/2672645 "2025-12-31T01:16:34Z")

</div>

Hi everyone, I’m creating a test project using UE5.4.4 which is simply repeatedly play a mp4 video using UMG. But there are several problems: When using the looping functionality provided by the media player, the video…

---

## [Third Party: Unhandled exception Module not found](https://forums.unrealengine.com/t/third-party-unhandled-exception-module-not-found/482165)

<div class="topic-metadata">

**Author:** [@Bionic\_Ape](https://forums.unrealengine.com/u/Bionic_Ape)\
**Replies:** 6\
**Last updated:** [December 30, 2025, 9:22pm UTC](https://forums.unrealengine.com/t/third-party-unhandled-exception-module-not-found/482165 "2025-12-30T21:22:09Z")

</div>

Hi, I never had a problem integrating simple Third Party libraries, because it was just copying and pasting from other Engine plugins or using the “New ThirdParty Plugin” creator from the Editor. But now I want to use t…

---

## [UE 5.2 - Lock Camera on Target C++](https://forums.unrealengine.com/t/ue-5-2-lock-camera-on-target-c/1233011)

<div class="topic-metadata">

**Author:** [@RedHawk006](https://forums.unrealengine.com/u/RedHawk006)\
**Replies:** 1\
**Last updated:** [December 30, 2025, 7:22am UTC](https://forums.unrealengine.com/t/ue-5-2-lock-camera-on-target-c/1233011 "2025-12-30T07:22:18Z")

</div>

Hello everyone. I have this problem: in C++ I wrote the code for lock my camera on an actor that I hit and is working just fine: I press my right mouse button, then with the help of the fuction SphereTraceSingleForObjec…

---

## [Compile errors when upgrading from 4.26 to 5.6](https://forums.unrealengine.com/t/compile-errors-when-upgrading-from-4-26-to-5-6/2650191)

<div class="topic-metadata">

**Author:** [@ddbrown30](https://forums.unrealengine.com/u/ddbrown30)\
**Replies:** 3\
**Last updated:** [December 30, 2025, 12:53am UTC](https://forums.unrealengine.com/t/compile-errors-when-upgrading-from-4-26-to-5-6/2650191 "2025-12-30T00:53:06Z")

</div>

I’m trying to upgrade my 4.26 project to 5.6. I’ve been getting these errors below. I finally got fed up and commented out literally every file in my project and then it started hitting in the VisualStudioTools plugin (s…

---

## [I can't generate a Visual Studio Code project](https://forums.unrealengine.com/t/i-cant-generate-a-visual-studio-code-project/2688232)

<div class="topic-metadata">

**Author:** [@\_dy2](https://forums.unrealengine.com/u/_dy2)\
**Replies:** 2\
**Last updated:** [December 29, 2025, 12:37am UTC](https://forums.unrealengine.com/t/i-cant-generate-a-visual-studio-code-project/2688232 "2025-12-29T00:37:32Z")

</div>

I am encountering the crash in version 5.5.4. Running F:/Tools/UE\_5.5/Engine/Build/BatchFiles/Build.bat -projectfiles -project=“E:/Unreal Projects/soudache/soudache.uproject” -game -rocket -progress Using bundled Dot…

---

## [Get Most Recently Used Input Device switches to Keyboard/Mouse when using Set Mouse Cursor Position (worked in 5.4.4) ](https://forums.unrealengine.com/t/get-most-recently-used-input-device-switches-to-keyboard-mouse-when-using-set-mouse-cursor-position-worked-in-5-4-4/2688290)

<div class="topic-metadata">

**Author:** [@StazixLS](https://forums.unrealengine.com/u/StazixLS)\
**Replies:** 0\
**Last updated:** [December 28, 2025, 9:16pm UTC](https://forums.unrealengine.com/t/get-most-recently-used-input-device-switches-to-keyboard-mouse-when-using-set-mouse-cursor-position-worked-in-5-4-4/2688290 "2025-12-28T21:16:31Z")

</div>

Hi, I’m running into an input detection issue after migrating a project from UE 5.4.4 to UE 5.6, related to the InputDeviceSubsystem. In my UI system, I rely on Set Mouse Cursor Position to ensure correct widget hover …

---

## [Can't rebuild visual studio files as the option is not there.](https://forums.unrealengine.com/t/cant-rebuild-visual-studio-files-as-the-option-is-not-there/2687514)

<div class="topic-metadata">

**Author:** [@PerCat1](https://forums.unrealengine.com/u/PerCat1)\
**Replies:** 9\
**Last updated:** [December 27, 2025, 8:30pm UTC](https://forums.unrealengine.com/t/cant-rebuild-visual-studio-files-as-the-option-is-not-there/2687514 "2025-12-27T20:30:09Z")

</div>

I’m trying to add some C++ to my project in order to utilize GAS system fully, unfortunately when I convert my project to C++ and Blueprints it tells me to rebuild from source manually. This option does not exist for me. …

---

## [Look for dev for collaboration  ](https://forums.unrealengine.com/t/look-for-dev-for-collaboration/2688010)

<div class="topic-metadata">

**Author:** [@Godofwrchi](https://forums.unrealengine.com/u/Godofwrchi)\
**Replies:** 0\
**Last updated:** [December 27, 2025, 2:22pm UTC](https://forums.unrealengine.com/t/look-for-dev-for-collaboration/2688010 "2025-12-27T14:22:00Z")

</div>

I need dev that can help me with a game I am starting it a zombie apocalypse game if you are interested message me and I will give you the discord group link

---

## [Bullet trajectory affected by weapon recoil animation](https://forums.unrealengine.com/t/bullet-trajectory-affected-by-weapon-recoil-animation/2687831)

<div class="topic-metadata">

**Author:** [@Dozzirik](https://forums.unrealengine.com/u/Dozzirik)\
**Replies:** 3\
**Last updated:** [December 26, 2025, 10:53pm UTC](https://forums.unrealengine.com/t/bullet-trajectory-affected-by-weapon-recoil-animation/2687831 "2025-12-26T22:53:29Z")

</div>

hello all. since I fire again before the animation finishes and the bullets spawn from the muzzle socket, they go in the wrong direction. i use anim montage. can u help me

---

## [Setting a custom hardware cursor does not work unless the mouse cursor re-enters the active game window](https://forums.unrealengine.com/t/setting-a-custom-hardware-cursor-does-not-work-unless-the-mouse-cursor-re-enters-the-active-game-window/402238)

<div class="topic-metadata">

**Author:** [@BUCH\_Dragon](https://forums.unrealengine.com/u/BUCH_Dragon)\
**Replies:** 26\
**Last updated:** [December 26, 2025, 10:40pm UTC](https://forums.unrealengine.com/t/setting-a-custom-hardware-cursor-does-not-work-unless-the-mouse-cursor-re-enters-the-active-game-window/402238 "2025-12-26T22:40:09Z")

</div>

Affected versions: 4.17.1 4.17 4.16 (Tested only under Play In Editor functionality) Description: Setting a custom hardware cursor does not work unless the mouse cursor enters the active game window. That is, it does…

---

## [How not to save a variable, but have it duplicated/persist when going into PIE mode ?](https://forums.unrealengine.com/t/how-not-to-save-a-variable-but-have-it-duplicated-persist-when-going-into-pie-mode/22692)

<div class="topic-metadata">

**Author:** [@polytopey](https://forums.unrealengine.com/u/polytopey)\
**Replies:** 7\
**Last updated:** [December 26, 2025, 10:16pm UTC](https://forums.unrealengine.com/t/how-not-to-save-a-variable-but-have-it-duplicated-persist-when-going-into-pie-mode/22692 "2025-12-26T22:16:26Z")

</div>

I have an array variable, contains a huge precomputed data. Saving it (not save game, but in editor with the map) fail because it’s more than 2GB in size. I tried NonPIEDuplicateTransient hoping that the data don’t get s…

---

## [Learning-Agents with C++ in UE 5.7.1 LearningAgentsPPOTrainer derived class will not build](https://forums.unrealengine.com/t/learning-agents-with-c-in-ue-5-7-1-learningagentsppotrainer-derived-class-will-not-build/2687493)

<div class="topic-metadata">

**Author:** [@theseus2703](https://forums.unrealengine.com/u/theseus2703)\
**Replies:** 1\
**Last updated:** [December 24, 2025, 9:14pm UTC](https://forums.unrealengine.com/t/learning-agents-with-c-in-ue-5-7-1-learningagentsppotrainer-derived-class-will-not-build/2687493 "2025-12-24T21:14:03Z")

</div>

Hello and merry chistmas :stuck\_out\_tongue: I was creating a new blank C++ Project in UE 5.7.1 and enabled the Learning-Agents Plugin. When i tried to add a C++ class with parent class LearningAgentsPPOTrainer, the cla…

---

## [projectile to crosshair problem](https://forums.unrealengine.com/t/projectile-to-crosshair-problem/2687141)

<div class="topic-metadata">

**Author:** [@Dozzirik](https://forums.unrealengine.com/u/Dozzirik)\
**Replies:** 0\
**Last updated:** [December 23, 2025, 12:50pm UTC](https://forums.unrealengine.com/t/projectile-to-crosshair-problem/2687141 "2025-12-23T12:50:52Z")

</div>

hello all. when firing, if my crosshair hits an obstacle or makes contact with something, the projectile moves properly. But when it hits empty space or the sky, it moves to the left. how can i fix this issue? thanks…

[Previous page](https://forums.unrealengine.com/c/development-discussion/programming-scripting/c-programming/29.md?page=16)

[Next page](https://forums.unrealengine.com/c/development-discussion/programming-scripting/c-programming/29.md?page=18)
