# C++

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

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

**Page:** 95

---

## [Unable to package with Texture Graph on](https://forums.unrealengine.com/t/unable-to-package-with-texture-graph-on/1925286)

<div class="topic-metadata">

**Author:** [@Ekalyks](https://forums.unrealengine.com/u/Ekalyks)\
**Replies:** 1\
**Last updated:** [July 18, 2024, 2:48pm UTC](https://forums.unrealengine.com/t/unable-to-package-with-texture-graph-on/1925286 "2024-07-18T14:48:54Z")

</div>

Today I tried out Texture Graph with 5.4.2. Unfortunately, When I tried to package, it threw an error telling a runtime module depends on an editor module. Then I found the TextureGraphEngine module refers to that re…

---

## [Character Rotation Resets every frame](https://forums.unrealengine.com/t/character-rotation-resets-every-frame/1941866)

<div class="topic-metadata">

**Author:** [@ChrisBolis](https://forums.unrealengine.com/u/ChrisBolis)\
**Replies:** 1\
**Last updated:** [July 18, 2024, 1:53pm UTC](https://forums.unrealengine.com/t/character-rotation-resets-every-frame/1941866 "2024-07-18T13:53:27Z")

</div>

Hello! Im trying to smoothly rotate my character class to Look At a specified position. I wrote this function and it works as expected: void AMainPlayer::LookAt(FVector Target) { FVector Direction = (Target - Control…

---

## [UE5.2 executable gets stuck at "UGameplayTagsManager::InitializeManager" (just before "Initializing FReadOnlyCVARCache")](https://forums.unrealengine.com/t/ue5-2-executable-gets-stuck-at-ugameplaytagsmanager-initializemanager-just-before-initializing-freadonlycvarcache/1940474)

<div class="topic-metadata">

**Author:** [@4ndr3aR](https://forums.unrealengine.com/u/4ndr3aR)\
**Replies:** 1\
**Last updated:** [July 18, 2024, 1:13pm UTC](https://forums.unrealengine.com/t/ue5-2-executable-gets-stuck-at-ugameplaytagsmanager-initializemanager-just-before-initializing-freadonlycvarcache/1940474 "2024-07-18T13:13:26Z")

</div>

Hey folks, I have a memory leak in my UE5.2 code and I can’t debug it. I’m grabbing and saving textures using the code from this repo but after a few thousands images, the executable goes OOM and gets killed by Linux. I…

---

## [How to bind Event to AnimMontageEnded?](https://forums.unrealengine.com/t/how-to-bind-event-to-animmontageended/638320)

<div class="topic-metadata">

**Author:** [@Alexa.Ki](https://forums.unrealengine.com/u/Alexa.Ki)\
**Replies:** 4\
**Last updated:** [July 18, 2024, 12:42pm UTC](https://forums.unrealengine.com/t/how-to-bind-event-to-animmontageended/638320 "2024-07-18T12:42:35Z")

</div>

I have a C++ animation class and can access it successfully UMyAnimInstance \* MyAnimInstance = Cast\<UMyAnimInstance\>(GetMesh()-\>GetAnimInstance()); want to bind the OnMontage ended event to another event, is it possib…

---

## [BlueprintNativeEvent function can't access blueprint variables?](https://forums.unrealengine.com/t/blueprintnativeevent-function-cant-access-blueprint-variables/1941022)

<div class="topic-metadata">

**Author:** [@Sicko\_0](https://forums.unrealengine.com/u/Sicko_0)\
**Replies:** 3\
**Last updated:** [July 18, 2024, 8:14am UTC](https://forums.unrealengine.com/t/blueprintnativeevent-function-cant-access-blueprint-variables/1941022 "2024-07-18T08:14:01Z")

</div>

I have a C++ UUserWidget class, and from that I derived a blueprint class. In the C++ class, I created a function and added the BlueprintNativeEvent Macro to it in order to be able to call the event from both c++ and bl…

---

## [c++ function get cut in blueprint](https://forums.unrealengine.com/t/c-function-get-cut-in-blueprint/1927725)

<div class="topic-metadata">

**Author:** [@user\_ac7b3f61e6084bc78f99f1986c3e21c316e1eb66e3e2076aa91d53](https://forums.unrealengine.com/u/user_ac7b3f61e6084bc78f99f1986c3e21c316e1eb66e3e2076aa91d53)\
**Replies:** 4\
**Last updated:** [July 18, 2024, 5:12am UTC](https://forums.unrealengine.com/t/c-function-get-cut-in-blueprint/1927725 "2024-07-18T05:12:38Z")

</div>

I created Grab and Release function in C++ with BlueprintCallable. This works properly but when I quit the editor and restart editor, the blueprint nodes always makes error.(Like above screenshot) So I proceed ‘Proje…

---

## [How to create a directional dodge vs stationary](https://forums.unrealengine.com/t/how-to-create-a-directional-dodge-vs-stationary/1939908)

<div class="topic-metadata">

**Author:** [@TheoRat3](https://forums.unrealengine.com/u/TheoRat3)\
**Replies:** 3\
**Last updated:** [July 18, 2024, 2:04am UTC](https://forums.unrealengine.com/t/how-to-create-a-directional-dodge-vs-stationary/1939908 "2024-07-18T02:04:46Z")

</div>

I’m currently working on an aerial dodge mechanic inspired by Kingdom Hearts 2’s. If the left stick isn’t moved, the dodge sends you vertically, but when you move the left stick it will launch the player in that directio…

---

## [Can't get two box collision to block each other](https://forums.unrealengine.com/t/cant-get-two-box-collision-to-block-each-other/1941277)

<div class="topic-metadata">

**Author:** [@maxfereneth](https://forums.unrealengine.com/u/maxfereneth)\
**Replies:** 0\
**Last updated:** [July 18, 2024, 1:58am UTC](https://forums.unrealengine.com/t/cant-get-two-box-collision-to-block-each-other/1941277 "2024-07-18T01:58:51Z")

</div>

Hello! The general idea of what I want to accomplish is this: I want to emulate Dead space inventory system, like so: now, since I don’t have a real clue on how to do it, my Idea is to have a widget (inventory) floa…

---

## [error Unable to instantiate module 'OpenVDB' when building fresh ue4 from github](https://forums.unrealengine.com/t/error-unable-to-instantiate-module-openvdb-when-building-fresh-ue4-from-github/1941174)

<div class="topic-metadata">

**Author:** [@FGEROGddd](https://forums.unrealengine.com/u/FGEROGddd)\
**Replies:** 0\
**Last updated:** [July 17, 2024, 10:40pm UTC](https://forums.unrealengine.com/t/error-unable-to-instantiate-module-openvdb-when-building-fresh-ue4-from-github/1941174 "2024-07-17T22:40:48Z")

</div>

I’m having trouble building Unreal Engine 4.25.2 in Visual Studio 2019. My solution configuration is set to “Development” and the solution platform is “Win64.” I have the UnrealVS plugin installed and working. When I ru…

---

## [Comparing Two Void\* Parameters (knowing their FProperty), How to do?](https://forums.unrealengine.com/t/comparing-two-void-parameters-knowing-their-fproperty-how-to-do/1916142)

<div class="topic-metadata">

**Author:** [@HighRender](https://forums.unrealengine.com/u/HighRender)\
**Replies:** 6\
**Last updated:** [July 17, 2024, 8:34pm UTC](https://forums.unrealengine.com/t/comparing-two-void-parameters-knowing-their-fproperty-how-to-do/1916142 "2024-07-17T20:34:10Z")

</div>

Hello, I have a UFunction that uses two void\*. I use “CustomThunk” + “DECLARE\_FUNCTION” to be able to handle the “Property” of the incoming variables and references. My function is comparing whether they are equal or n…

---

## [FTimeSpan::GetSeconds() considered harmful!](https://forums.unrealengine.com/t/ftimespan-getseconds-considered-harmful/1927801)

<div class="topic-metadata">

**Author:** [@mstorer3772](https://forums.unrealengine.com/u/mstorer3772)\
**Replies:** 3\
**Last updated:** [July 17, 2024, 5:19pm UTC](https://forums.unrealengine.com/t/ftimespan-getseconds-considered-harmful/1927801 "2024-07-17T17:19:30Z")

</div>

Does your game use GetSeconds()? Does your game have weird, intermittent problems? There might be a direct correlation. FTimespan::GetSeconds() can cause sneaky, intermittent bugs. It is also exposed to Blueprint in …

---

## [How can I change a Blueprint class's thumbnail or class color using C++ in Unreal Engine 5?](https://forums.unrealengine.com/t/how-can-i-change-a-blueprint-classs-thumbnail-or-class-color-using-c-in-unreal-engine-5/1940559)

<div class="topic-metadata">

**Author:** [@PVO\_GOOR](https://forums.unrealengine.com/u/PVO_GOOR)\
**Replies:** 0\
**Last updated:** [July 17, 2024, 12:02pm UTC](https://forums.unrealengine.com/t/how-can-i-change-a-blueprint-classs-thumbnail-or-class-color-using-c-in-unreal-engine-5/1940559 "2024-07-17T12:02:47Z")

</div>

Hello, I’ve been working on this for a long time. I can specify my custom class using FAssetTypeActions\_Base and change its color, but when the class is of Blueprint type, it defaults to blue. Even though I set the color…

---

## [Where do I implement methods only need in a level?](https://forums.unrealengine.com/t/where-do-i-implement-methods-only-need-in-a-level/1940351)

<div class="topic-metadata">

**Author:** [@ViaCognita](https://forums.unrealengine.com/u/ViaCognita)\
**Replies:** 0\
**Last updated:** [July 17, 2024, 7:15am UTC](https://forums.unrealengine.com/t/where-do-i-implement-methods-only-need-in-a-level/1940351 "2024-07-17T07:15:20Z")

</div>

Hi! I’m using Unreal 5.3.2 and I have a question about software design. I have some methods that I only need them in a level (I use them to do some calculations). Where do I implement them? In a C++ class? In an Actor …

---

## [Module error when launching C++ project](https://forums.unrealengine.com/t/module-error-when-launching-c-project/132382)

<div class="topic-metadata">

**Author:** [@The\_Pyrotechnic](https://forums.unrealengine.com/u/The_Pyrotechnic)\
**Replies:** 3\
**Last updated:** [July 17, 2024, 4:48am UTC](https://forums.unrealengine.com/t/module-error-when-launching-c-project/132382 "2024-07-17T04:48:08Z")

</div>

I have successfully compiled UE4.23.0 and am attempting to create a C++ project on Linux. Setup.sh, GenerateProjectFiles.sh, and make all ran without error. I am able to create a C++ project successfully, but when I atte…

---

## [GAS Aggregate with snapshot](https://forums.unrealengine.com/t/gas-aggregate-with-snapshot/1940168)

<div class="topic-metadata">

**Author:** [@as\_dbak](https://forums.unrealengine.com/u/as_dbak)\
**Replies:** 0\
**Last updated:** [July 17, 2024, 2:52am UTC](https://forums.unrealengine.com/t/gas-aggregate-with-snapshot/1940168 "2024-07-17T02:52:30Z")

</div>

Hello. I am using the GAS system. I noticed that when I run GameplayEffectExecution, the attribute that takes the snapshot does not apply Custom EvaluationMetaData. Is it intended that FAggregator::TakeSnapshotOf does n…

---

## [Setting Input Actions in C++](https://forums.unrealengine.com/t/setting-input-actions-in-c/1939925)

<div class="topic-metadata">

**Author:** [@EvilGeniusTC](https://forums.unrealengine.com/u/EvilGeniusTC)\
**Replies:** 1\
**Last updated:** [July 17, 2024, 1:24am UTC](https://forums.unrealengine.com/t/setting-input-actions-in-c/1939925 "2024-07-17T01:24:28Z")

</div>

I’ll preface this with I’m well aware its far more convenient and even advantageous to set IAs in the editor however im just trying to see how much i can actually set in the c++ and so far i have a moving “character” tha…

---

## [Access violation on a TArray of FVectors when using Add()](https://forums.unrealengine.com/t/access-violation-on-a-tarray-of-fvectors-when-using-add/1928601)

<div class="topic-metadata">

**Author:** [@AwakeMC](https://forums.unrealengine.com/u/AwakeMC)\
**Replies:** 1\
**Last updated:** [July 16, 2024, 9:33pm UTC](https://forums.unrealengine.com/t/access-violation-on-a-tarray-of-fvectors-when-using-add/1928601 "2024-07-16T21:33:58Z")

</div>

I sometimes get the following error whenever I try to generate my chunks. Exception thrown at 0x00007FF80028DDE4 (UnrealEditor-Bountiful.dll) in UnrealEditor.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF…

---

## [How to get objects with a object tag name in Sequencer using C++](https://forums.unrealengine.com/t/how-to-get-objects-with-a-object-tag-name-in-sequencer-using-c/1939643)

<div class="topic-metadata">

**Author:** [@PracticalJoker](https://forums.unrealengine.com/u/PracticalJoker)\
**Replies:** 0\
**Last updated:** [July 16, 2024, 4:01pm UTC](https://forums.unrealengine.com/t/how-to-get-objects-with-a-object-tag-name-in-sequencer-using-c/1939643 "2024-07-16T16:01:09Z")

</div>

I would like to know the code to get objects with a object tag name in a Sequencer track. Normally, in a game environment, when you run the Sequencer using CreateLevelSequencePlayer function, an ALevelSequenceActor is c…

---

## [How to bind c++ function to Output Animation Pose node](https://forums.unrealengine.com/t/how-to-bind-c-function-to-output-animation-pose-node/591768)

<div class="topic-metadata">

**Author:** [@HashBuoy](https://forums.unrealengine.com/u/HashBuoy)\
**Replies:** 6\
**Last updated:** [July 16, 2024, 9:57am UTC](https://forums.unrealengine.com/t/how-to-bind-c-function-to-output-animation-pose-node/591768 "2024-07-16T09:57:06Z")

</div>

I am trying to avoid binding the Blueprint function to animation nodes. Following this documentation on optimization for animation blueprint. How can I bind c++ function defined in anim instance parent class to the o…

---

## [Compile Global Shader Map Stuck In UE 5.4.0](https://forums.unrealengine.com/t/compile-global-shader-map-stuck-in-ue-5-4-0/1938995)

<div class="topic-metadata">

**Author:** [@Yuri9447](https://forums.unrealengine.com/u/Yuri9447)\
**Replies:** 0\
**Last updated:** [July 16, 2024, 5:07am UTC](https://forums.unrealengine.com/t/compile-global-shader-map-stuck-in-ue-5-4-0/1938995 "2024-07-16T05:07:56Z")

</div>

Hi, I was using source code UE5.4.0 to run a cooked debug build in Visual Studio. When I set the command line args with “-NoThreading”, the engine will stuck in compiling global shader map. More specifically, the code w…

---

## [Getting LNK2005 Error when packaging a C++ project with ROSIntegration and MathWorks Interface plugins](https://forums.unrealengine.com/t/getting-lnk2005-error-when-packaging-a-c-project-with-rosintegration-and-mathworks-interface-plugins/1938855)

<div class="topic-metadata">

**Author:** [@azp\_hn](https://forums.unrealengine.com/u/azp_hn)\
**Replies:** 0\
**Last updated:** [July 16, 2024, 1:59am UTC](https://forums.unrealengine.com/t/getting-lnk2005-error-when-packaging-a-c-project-with-rosintegration-and-mathworks-interface-plugins/1938855 "2024-07-16T01:59:49Z")

</div>

I’m having an issue packaging my project with ROSIntegration and Mathworks Interface plugins. The original project is the sample project of the MATLAB-UnrealEngine Co-simulation framework from MathWorks (MathWorks Inter…

---

## [Get a timer or tick from engine subsystem](https://forums.unrealengine.com/t/get-a-timer-or-tick-from-engine-subsystem/653779)

<div class="topic-metadata">

**Author:** [@tmxxxmt](https://forums.unrealengine.com/u/tmxxxmt)\
**Replies:** 9\
**Last updated:** [July 15, 2024, 11:22pm UTC](https://forums.unrealengine.com/t/get-a-timer-or-tick-from-engine-subsystem/653779 "2024-07-15T23:22:41Z")

</div>

I have an engine subsystem and I have a task that it needs to perform (it’s actually that it needs to communicate over a network but rate-limited), but the subsystem doesn’t have a OnTick() method I can override and I do…

---

## [How do you set specific camera as view target](https://forums.unrealengine.com/t/how-do-you-set-specific-camera-as-view-target/1938579)

<div class="topic-metadata">

**Author:** [@Rancid\_Poncho](https://forums.unrealengine.com/u/Rancid_Poncho)\
**Replies:** 0\
**Last updated:** [July 15, 2024, 8:25pm UTC](https://forums.unrealengine.com/t/how-do-you-set-specific-camera-as-view-target/1938579 "2024-07-15T20:25:13Z")

</div>

I’ve been trying to migrate my spring arm and camera components to my APlayerController child class, turning bAutoManageActiveCameraTarget to false and setting the view target to ‘this.’ I’ve overridden OnPossess and add…

---

## [C++ Code not being found by the engine?](https://forums.unrealengine.com/t/c-code-not-being-found-by-the-engine/1938313)

<div class="topic-metadata">

**Author:** [@User-400315961](https://forums.unrealengine.com/u/User-400315961)\
**Replies:** 5\
**Last updated:** [July 15, 2024, 6:33pm UTC](https://forums.unrealengine.com/t/c-code-not-being-found-by-the-engine/1938313 "2024-07-15T18:33:13Z")

</div>

Hello everyone, I am trying to make a C++ blueprint function library, but for some reason it won’t appear on the content browser (in spite of showing up on the file explorer). This is particularly odd since my other …

---

## [Switch Subsystem not working 5.3.2](https://forums.unrealengine.com/t/switch-subsystem-not-working-5-3-2/1938333)

<div class="topic-metadata">

**Author:** [@luhpatez](https://forums.unrealengine.com/u/luhpatez)\
**Replies:** 0\
**Last updated:** [July 15, 2024, 4:36pm UTC](https://forums.unrealengine.com/t/switch-subsystem-not-working-5-3-2/1938333 "2024-07-15T16:36:18Z")

</div>

I made a custom class to switch between Google and Null Subsystems but it doesn’t work on Android Packaged via Game Instance All game and code is working fine I don’t know but looks like UE5.3 is not supporting Create …

---

## [Camera Offset and Changes to FMinimalViewInfo not applied in MRQ](https://forums.unrealengine.com/t/camera-offset-and-changes-to-fminimalviewinfo-not-applied-in-mrq/1938315)

<div class="topic-metadata">

**Author:** [@blackcan11221](https://forums.unrealengine.com/u/blackcan11221)\
**Replies:** 0\
**Last updated:** [July 15, 2024, 4:17pm UTC](https://forums.unrealengine.com/t/camera-offset-and-changes-to-fminimalviewinfo-not-applied-in-mrq/1938315 "2024-07-15T16:17:51Z")

</div>

Hey everyone, i implemented my own UCineCameraComponent and ACineCameraActor and wanted to make changes to the FOV (regardless of if the Camera is Tracked in the Sequence) and also use the OffCenterProjectionOffset Func…

---

## [UE5.4 Learning Agents can't be use in C++](https://forums.unrealengine.com/t/ue5-4-learning-agents-cant-be-use-in-c/1932449)

<div class="topic-metadata">

**Author:** [@MEIJW1](https://forums.unrealengine.com/u/MEIJW1)\
**Replies:** 1\
**Last updated:** [July 15, 2024, 2:05pm UTC](https://forums.unrealengine.com/t/ue5-4-learning-agents-cant-be-use-in-c/1932449 "2024-07-15T14:05:56Z")

</div>

I created the LearningAgentsManager in C++, but modified MaxAgentNum after inheriting the blueprint, which resulted in the smart addition of an agent This is always 1 In CreateDefaultSubobject, the component PostI…

---

## [How to show StaticMesh's from UDataTable in viewport and not only at runtime](https://forums.unrealengine.com/t/how-to-show-staticmeshs-from-udatatable-in-viewport-and-not-only-at-runtime/1938030)

<div class="topic-metadata">

**Author:** [@kcinkcinkcinnick](https://forums.unrealengine.com/u/kcinkcinkcinnick)\
**Replies:** 3\
**Last updated:** [July 15, 2024, 11:48am UTC](https://forums.unrealengine.com/t/how-to-show-staticmeshs-from-udatatable-in-viewport-and-not-only-at-runtime/1938030 "2024-07-15T11:48:34Z")

</div>

Hello my fellow enthousiasts, \_ I have a Pickup Actor which retrieves all available pickup item data through a DataTable. In the constructor I retrieve this DataTable: static ConstructorHelpers::FObjectFinder\<UDataTa…

---

## [C++ PickupActor - how to add UserWidget to WidgetComponent at runtime?](https://forums.unrealengine.com/t/c-pickupactor-how-to-add-userwidget-to-widgetcomponent-at-runtime/1937434)

<div class="topic-metadata">

**Author:** [@kcinkcinkcinnick](https://forums.unrealengine.com/u/kcinkcinkcinnick)\
**Replies:** 0\
**Last updated:** [July 14, 2024, 8:44pm UTC](https://forums.unrealengine.com/t/c-pickupactor-how-to-add-userwidget-to-widgetcomponent-at-runtime/1937434 "2024-07-14T20:44:55Z")

</div>

Hi all, A quick overview of what I want to achieve: A BP\_Pickup object that derives from my Pickup Actor C++ class. The name of the Pickup object is shown above it using my PickupItemName Widget. All in C++, with Wi…

---

## [windows.h include related errors without including windows.h](https://forums.unrealengine.com/t/windows-h-include-related-errors-without-including-windows-h/1937078)

<div class="topic-metadata">

**Author:** [@AveryMadness63](https://forums.unrealengine.com/u/AveryMadness63)\
**Replies:** 0\
**Last updated:** [July 14, 2024, 1:23pm UTC](https://forums.unrealengine.com/t/windows-h-include-related-errors-without-including-windows-h/1937078 "2024-07-14T13:23:01Z")

</div>

Hello, first post on this forum, I usually try as hard as possible to find fixes to problems before asking for help, but I can’t find a fix to this one. I’m working on a game in Unreal, (4.27) using an engine build from…

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

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