# C++

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

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

**Page:** 68

---

## [Separate file for your macros, does it make sense?](https://forums.unrealengine.com/t/separate-file-for-your-macros-does-it-make-sense/2153353)

<div class="topic-metadata">

**Author:** [@blAddddDe](https://forums.unrealengine.com/u/blAddddDe)\
**Replies:** 3\
**Last updated:** [November 27, 2024, 3:55pm UTC](https://forums.unrealengine.com/t/separate-file-for-your-macros-does-it-make-sense/2153353 "2024-11-27T15:55:30Z")

</div>

Hey, everybody. I would like to ask if it makes sense to make a separate file and declare macros there and use them by code? File Example: Usage Example: Thx.

---

## [SCOPE\_CYCLE\_COUNTER not showing up in Unreal Insights](https://forums.unrealengine.com/t/scope-cycle-counter-not-showing-up-in-unreal-insights/1262418)

<div class="topic-metadata">

**Author:** [@FunGames55](https://forums.unrealengine.com/u/FunGames55)\
**Replies:** 3\
**Last updated:** [November 27, 2024, 2:38pm UTC](https://forums.unrealengine.com/t/scope-cycle-counter-not-showing-up-in-unreal-insights/1262418 "2024-11-27T14:38:13Z")

</div>

Is there a way to get the stats system counters to show up in Unreal Insights? I am running a trace with “-trace=default,bookmark,stats,counter,cpu,task,gpu,loadtime” I see in the documentation the stats system is supp…

---

## [Why does some UIs doesn't become visible?](https://forums.unrealengine.com/t/why-does-some-uis-doesnt-become-visible/2154316)

<div class="topic-metadata">

**Author:** [@Justrenis](https://forums.unrealengine.com/u/Justrenis)\
**Replies:** 8\
**Last updated:** [November 27, 2024, 1:31pm UTC](https://forums.unrealengine.com/t/why-does-some-uis-doesnt-become-visible/2154316 "2024-11-27T13:31:42Z")

</div>

When i toggle UI in code,some UIs just doesn’t become visible, when i setup Widget BP of UI, i make them all SelfHitInvisible, since if i make them Collapsed then it almost never will be visible whatever i do, thus i mak…

---

## [What do? If I can't use ConstructorHelpers::FObjectFinder? Will the cooker ignore this later on?](https://forums.unrealengine.com/t/what-do-if-i-cant-use-constructorhelpers-fobjectfinder-will-the-cooker-ignore-this-later-on/142369)

<div class="topic-metadata">

**Author:** [@namrog84](https://forums.unrealengine.com/u/namrog84)\
**Replies:** 4\
**Last updated:** [November 27, 2024, 7:21am UTC](https://forums.unrealengine.com/t/what-do-if-i-cant-use-constructorhelpers-fobjectfinder-will-the-cooker-ignore-this-later-on/142369 "2024-11-27T07:21:52Z")

</div>

I have some Actor. This actor represents all the items in my game that can be picked up. class APickupActor: public AActor In the constructor I use static ConstructorHelpers::FObjectFinder\<UStaticMesh\> DefaultSpher…

---

## [Memory leak in python import\_asset\_tasks](https://forums.unrealengine.com/t/memory-leak-in-python-import-asset-tasks/245073)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_de5bc3231](https://forums.unrealengine.com/u/anonymous_user_de5bc3231)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 6:31am UTC](https://forums.unrealengine.com/t/memory-leak-in-python-import-asset-tasks/245073 "2024-11-27T06:31:12Z")

</div>

I wrote a script in python for automatic mesh import into a project. Code looks lide that: for i in range(len(self.files)): path\_to\_file = str(self.path\_to\_directory / self.files\[i\]) st\_…

---

## [\[4.15\] DataTable, recompile and hotreload bug](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141)

<div class="topic-metadata">

**Author:** [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Replies:** 12\
**Last updated:** [November 26, 2024, 5:21pm UTC](https://forums.unrealengine.com/t/4-15-datatable-recompile-and-hotreload-bug/388141 "2024-11-26T17:21:14Z")

</div>

I added two new properties to my table row struct in C++ and then compiled using hot-reload. The two new properties were not showing on my datatable editor so I restarted the editor. Once I restarted the editor I found…

---

## [Error from inheriting from UBlendSpace](https://forums.unrealengine.com/t/error-from-inheriting-from-ublendspace/2152256)

<div class="topic-metadata">

**Author:** [@Blueccc123](https://forums.unrealengine.com/u/Blueccc123)\
**Replies:** 0\
**Last updated:** [November 26, 2024, 4:11pm UTC](https://forums.unrealengine.com/t/error-from-inheriting-from-ublendspace/2152256 "2024-11-26T16:11:33Z")

</div>

I want to make custom blendspace for SLerp. Because It forward and right root motion blending looks slow. Anyway, I created new C++ classess that inherits UBlendSpace But It immediatly makes LNK2001 error. Here’s examp…

---

## [The packaged project encountered a LowLevelFatalError](https://forums.unrealengine.com/t/the-packaged-project-encountered-a-lowlevelfatalerror/2151345)

<div class="topic-metadata">

**Author:** [@15530175137](https://forums.unrealengine.com/u/15530175137)\
**Replies:** 2\
**Last updated:** [November 26, 2024, 6:52am UTC](https://forums.unrealengine.com/t/the-packaged-project-encountered-a-lowlevelfatalerror/2151345 "2024-11-26T06:52:14Z")

</div>

The engine version I am using is 5.5.0. When I package my project and want to run tests, it does not start but instead prompts a LowLevelFatalError, as shown in an image. So I copy the file to another computer and run it…

---

## [Is there an equivalent library to \<chrono\> in Unreal?](https://forums.unrealengine.com/t/is-there-an-equivalent-library-to-chrono-in-unreal/2148154)

<div class="topic-metadata">

**Author:** [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Replies:** 1\
**Last updated:** [November 26, 2024, 12:53am UTC](https://forums.unrealengine.com/t/is-there-an-equivalent-library-to-chrono-in-unreal/2148154 "2024-11-26T00:53:31Z")

</div>

Sometimes I have different functions that return the same result. I’ve been noticing lately that sometimes the simplest code doesn’t have the best performance. I wonder if the Unreal library has something similar to \< …

---

## [2D character apply damage event and "turn" around functionality stop working on a tile map style level.](https://forums.unrealengine.com/t/2d-character-apply-damage-event-and-turn-around-functionality-stop-working-on-a-tile-map-style-level/2150921)

<div class="topic-metadata">

**Author:** [@Ramirojos](https://forums.unrealengine.com/u/Ramirojos)\
**Replies:** 0\
**Last updated:** [November 25, 2024, 9:29pm UTC](https://forums.unrealengine.com/t/2d-character-apply-damage-event-and-turn-around-functionality-stop-working-on-a-tile-map-style-level/2150921 "2024-11-25T21:29:29Z")

</div>

I’m making a 2D Sprite platformer as a personal project. I have an enemy character that hurts the player when it overlaps a damage box with the player’s capsule (triggers the “ApplyDamage” method) and turns around when a…

---

## [How can I monitor employees?](https://forums.unrealengine.com/t/how-can-i-monitor-employees/485357)

<div class="topic-metadata">

**Author:** [@jealynas059](https://forums.unrealengine.com/u/jealynas059)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 4:38pm UTC](https://forums.unrealengine.com/t/how-can-i-monitor-employees/485357 "2024-11-25T16:38:09Z")

</div>

Hello, I know that this forum not about monitoring, auditing and management, but I think there are many managers that learn something new, especially c++, so can you help me with soft that can be used for monitoring deve…

---

## [Integrate Cross Platform voice Chat plugin with Pixel Streamin](https://forums.unrealengine.com/t/integrate-cross-platform-voice-chat-plugin-with-pixel-streamin/2150428)

<div class="topic-metadata">

**Author:** [@The\_HASO](https://forums.unrealengine.com/u/The_HASO)\
**Replies:** 0\
**Last updated:** [November 25, 2024, 3:58pm UTC](https://forums.unrealengine.com/t/integrate-cross-platform-voice-chat-plugin-with-pixel-streamin/2150428 "2024-11-25T15:58:30Z")

</div>

Hello Everyone i have a Project that i use Universal Cross Platform voice chat pro on it And I want to integrate it with Pixel Streaming Because in Web i can’t Use the Plugin Voice chat Anymore

---

## [ue 4.27,Something strange happened while testing actor after setting“bReplicates = true”](https://forums.unrealengine.com/t/ue-4-27-something-strange-happened-while-testing-actor-after-setting-breplicates-true/2149964)

<div class="topic-metadata">

**Author:** [@Second\_Ukiyoe](https://forums.unrealengine.com/u/Second_Ukiyoe)\
**Replies:** 0\
**Last updated:** [November 25, 2024, 11:27am UTC](https://forums.unrealengine.com/t/ue-4-27-something-strange-happened-while-testing-actor-after-setting-breplicates-true/2149964 "2024-11-25T11:27:48Z")

</div>

A actor named “myactor” inherited from actor. I set “bReplicates = true” in its cpp Constructor. Then make two blueprint “bp1” “bp2” inherited from “myactor”. And cancel bp1’s bReplicates in blueprint. spawn bp1 only…

---

## [UInputSettings::bUseMouseForTouch doesn't work properly when changed on runtime.](https://forums.unrealengine.com/t/uinputsettings-busemousefortouch-doesnt-work-properly-when-changed-on-runtime/2149915)

<div class="topic-metadata">

**Author:** [@OBMWM](https://forums.unrealengine.com/u/OBMWM)\
**Replies:** 0\
**Last updated:** [November 25, 2024, 10:41am UTC](https://forums.unrealengine.com/t/uinputsettings-busemousefortouch-doesnt-work-properly-when-changed-on-runtime/2149915 "2024-11-25T10:41:44Z")

</div>

Hi hope you all are doing well. I have a need to change this value on runtime. I use this code to get it: if (UInputSettings\* InputSettings = UInputSettings::GetInputSettings()) { InputSettings-\>bUseMouseForTouch …

---

## [Change engine aspect ratio scaling from vert- to hor+](https://forums.unrealengine.com/t/change-engine-aspect-ratio-scaling-from-vert-to-hor/414703)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_60beddd21](https://forums.unrealengine.com/u/anonymous_user_60beddd21)\
**Replies:** 4\
**Last updated:** [November 25, 2024, 8:14am UTC](https://forums.unrealengine.com/t/change-engine-aspect-ratio-scaling-from-vert-to-hor/414703 "2024-11-25T08:14:57Z")

</div>

the question is in the title, an example is given below… when using wider monitors in unreal engine (say for example a 21:9 monitor), the bottom and top get cut off, this is far from optimal, how would I go around chang…

---

## [Here is how C++ delegate macros work internally](https://forums.unrealengine.com/t/here-is-how-c-delegate-macros-work-internally/2149694)

<div class="topic-metadata">

**Author:** [@STRiFE.x](https://forums.unrealengine.com/u/STRiFE.x)\
**Replies:** 0\
**Last updated:** [November 25, 2024, 7:35am UTC](https://forums.unrealengine.com/t/here-is-how-c-delegate-macros-work-internally/2149694 "2024-11-25T07:35:24Z")

</div>

Recently I had to deep dive into the delegate macros of Unreal Engine. While I was trying to understand how the pieces fit together, I was making a bunch of notes for myself. I’ll share the notes here for future referenc…

---

## [Actor reference clearing on blueprint compilation.](https://forums.unrealengine.com/t/actor-reference-clearing-on-blueprint-compilation/2149175)

<div class="topic-metadata">

**Author:** [@Vahan\_Davtian](https://forums.unrealengine.com/u/Vahan_Davtian)\
**Replies:** 0\
**Last updated:** [November 24, 2024, 11:01pm UTC](https://forums.unrealengine.com/t/actor-reference-clearing-on-blueprint-compilation/2149175 "2024-11-24T23:01:56Z")

</div>

I’m trying to create a new archetype object, that will serve as a template for spawning other actors of class. SpawnTemplateActor will have ShowInnerProperties so that the template instance can be modified in editor deta…

---

## [Resetting Editor mode string version.](https://forums.unrealengine.com/t/resetting-editor-mode-string-version/2143924)

<div class="topic-metadata">

**Author:** [@JulioJerez](https://forums.unrealengine.com/u/JulioJerez)\
**Replies:** 1\
**Last updated:** [November 24, 2024, 5:07pm UTC](https://forums.unrealengine.com/t/resetting-editor-mode-string-version/2143924 "2024-11-24T17:07:46Z")

</div>

Is there a way to reset the plugin editorMode string version? FName NewtonModelEditorMode::m\_editorVersionName(TEXT(“NewtonModelModeLayout\_v41”)); I am writing a plugin and it is really annoying that the slightest chan…

---

## [error when creating new c++ project](https://forums.unrealengine.com/t/error-when-creating-new-c-project/2148373)

<div class="topic-metadata">

**Author:** [@Jo218fort](https://forums.unrealengine.com/u/Jo218fort)\
**Replies:** 0\
**Last updated:** [November 24, 2024, 2:10pm UTC](https://forums.unrealengine.com/t/error-when-creating-new-c-project/2148373 "2024-11-24T14:10:31Z")

</div>

whn creating my first c++ project i got this error, it doesn’t happen when creating blueprint project though… An error occurred while trying to generate project files. Running D:/unreal/UE\_5.4/Engine/Build/BatchFiles/B…

---

## [WaterSubsystem How does GetWaveHeightAtPosition Work???](https://forums.unrealengine.com/t/watersubsystem-how-does-getwaveheightatposition-work/2148134)

<div class="topic-metadata">

**Author:** [@r\_q](https://forums.unrealengine.com/u/r_q)\
**Replies:** 1\
**Last updated:** [November 24, 2024, 12:05pm UTC](https://forums.unrealengine.com/t/watersubsystem-how-does-getwaveheightatposition-work/2148134 "2024-11-24T12:05:56Z")

</div>

I would like to understand how the GetWaveHeightAtPosition function works. I have tried this with a cube to float in the water using queries to the GetWaveHeightAtPosition function provided by the AWaterBody-\>GetWaterWa…

---

## [Can't build UE 4.27 from source, I've tried every package. (WILL PAY FOR HELP)](https://forums.unrealengine.com/t/cant-build-ue-4-27-from-source-ive-tried-every-package-will-pay-for-help/2147419)

<div class="topic-metadata">

**Author:** [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Replies:** 0\
**Last updated:** [November 23, 2024, 11:32pm UTC](https://forums.unrealengine.com/t/cant-build-ue-4-27-from-source-ive-tried-every-package-will-pay-for-help/2147419 "2024-11-23T23:32:48Z")

</div>

I have tried every single package I can, I get errors no mater what. I have reinstalled Visual Studio 2022 multiple times. I am thinking i’m simply missing some obscure package requirement in my installation, but i’ve r…

---

## [How does TActorIterator work internally?](https://forums.unrealengine.com/t/how-does-tactoriterator-work-internally/2139688)

<div class="topic-metadata">

**Author:** [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Replies:** 3\
**Last updated:** [November 23, 2024, 8:00pm UTC](https://forums.unrealengine.com/t/how-does-tactoriterator-work-internally/2139688 "2024-11-23T20:00:59Z")

</div>

I want to know how TActorIterator works internally. It’s a matter of efficiency. I mean. Suppose I want to search for a specific type of actor. for (TActorIterator\<AActor\> ItActor = TActorIterator\<AActor\>(World, ASo…

---

## [\[Online Subsystem Steam\]Crash when the host calls DestroySession.](https://forums.unrealengine.com/t/online-subsystem-steam-crash-when-the-host-calls-destroysession/2145386)

<div class="topic-metadata">

**Author:** [@sakuraba\_intense](https://forums.unrealengine.com/u/sakuraba_intense)\
**Replies:** 0\
**Last updated:** [November 23, 2024, 4:43am UTC](https://forums.unrealengine.com/t/online-subsystem-steam-crash-when-the-host-calls-destroysession/2145386 "2024-11-23T04:43:12Z")

</div>

Hello, I am encountering a crash issue when trying to use DestroySession with OnlineSubsystemSteam. Code Causing the Crash check(SessionInfo-\>SessionType == ESteamSession::AdvertisedSessionHost || SessionInfo-\>Session…

---

## [Creating slate window outside of Engine tick](https://forums.unrealengine.com/t/creating-slate-window-outside-of-engine-tick/2144593)

<div class="topic-metadata">

**Author:** [@David\_Morasz](https://forums.unrealengine.com/u/David_Morasz)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 10:06pm UTC](https://forums.unrealengine.com/t/creating-slate-window-outside-of-engine-tick/2144593 "2024-11-22T22:06:21Z")

</div>

I’m writing a low level error type for better and more civilized error handling from C++, is there a way in Slate to create a window with its own message pump so I can display potentially fatal errors to the user while b…

---

## [Creating a onetime lambda function bind to a delegate](https://forums.unrealengine.com/t/creating-a-onetime-lambda-function-bind-to-a-delegate/2141395)

<div class="topic-metadata">

**Author:** [@mrm\_dev](https://forums.unrealengine.com/u/mrm_dev)\
**Replies:** 7\
**Last updated:** [November 22, 2024, 2:53pm UTC](https://forums.unrealengine.com/t/creating-a-onetime-lambda-function-bind-to-a-delegate/2141395 "2024-11-22T14:53:15Z")

</div>

How do I bind a lambda function such that it get’s invoked ONLY once and then unbinds? I tried this but it doesn’t work: DECLARE\_MULTICAST\_DELEGATE(FMyDelegate); FMyDelegate MyDelegate; FDelegateHandle DelegateHandl…

---

## [ProjectDefinitions / Precompiler Definitions in Target.cs and Building via Command Line](https://forums.unrealengine.com/t/projectdefinitions-precompiler-definitions-in-target-cs-and-building-via-command-line/2140691)

<div class="topic-metadata">

**Author:** [@NEVQ151](https://forums.unrealengine.com/u/NEVQ151)\
**Replies:** 1\
**Last updated:** [November 21, 2024, 6:57pm UTC](https://forums.unrealengine.com/t/projectdefinitions-precompiler-definitions-in-target-cs-and-building-via-command-line/2140691 "2024-11-21T18:57:35Z")

</div>

Hi, I am compiling our project via RunUAT: call %UE\_5.3%/RunUAT.bat BuildCookRun -noP4 -utf8output -cook -project="%cd%/ProjectName.uproject" -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -p…

---

## [BlueprintImplementableEvent crashs](https://forums.unrealengine.com/t/blueprintimplementableevent-crashs/502407)

<div class="topic-metadata">

**Author:** [@ChrisMcCole](https://forums.unrealengine.com/u/ChrisMcCole)\
**Replies:** 1\
**Last updated:** [November 21, 2024, 3:56pm UTC](https://forums.unrealengine.com/t/blueprintimplementableevent-crashs/502407 "2024-11-21T15:56:05Z")

</div>

Hello! I am trying to update the size of an image on a UserWidget. This functionality has always existed and worked in BP. Problem is I need to call it from c++. The reason for this is that I need to update the size when…

---

## [State of TASKGRAPH\_NEW\_FRONTEND ? ](https://forums.unrealengine.com/t/state-of-taskgraph-new-frontend/2140960)

<div class="topic-metadata">

**Author:** [@clayman\_s](https://forums.unrealengine.com/u/clayman_s)\
**Replies:** 0\
**Last updated:** [November 21, 2024, 3:55pm UTC](https://forums.unrealengine.com/t/state-of-taskgraph-new-frontend/2140960 "2024-11-21T15:55:20Z")

</div>

Seems there is a new task graph implementation under TASKGRAPH\_NEW\_FRONTEND macro, can’t find any doc about it, anyone know the state of it, is it production ready now, and what improvements does it have compared to…

---

## [How Rename game module ? (it contains C++ code)](https://forums.unrealengine.com/t/how-rename-game-module-it-contains-c-code/467760)

<div class="topic-metadata">

**Author:** [@UnrealVerseGuru](https://forums.unrealengine.com/u/UnrealVerseGuru)\
**Replies:** 4\
**Last updated:** [November 21, 2024, 2:39pm UTC](https://forums.unrealengine.com/t/how-rename-game-module-it-contains-c-code/467760 "2024-11-21T14:39:37Z")

</div>

Hi, all other methods do not work anymore. I tried all of these multiple times, give multiple errors (mainly with BPs): Please @Epic help us.

---

## [Cant compile with newer version of visual studio ....](https://forums.unrealengine.com/t/cant-compile-with-newer-version-of-visual-studio/2140561)

<div class="topic-metadata">

**Author:** [@greatmazingerz](https://forums.unrealengine.com/u/greatmazingerz)\
**Replies:** 0\
**Last updated:** [November 21, 2024, 12:11pm UTC](https://forums.unrealengine.com/t/cant-compile-with-newer-version-of-visual-studio/2140561 "2024-11-21T12:11:53Z")

</div>

Hello I can t compile because my MSVC seems too recent … Could not spawn process C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\Hostx64\\x64\\link.exe. Error: 267 Failed to link p…

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

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