# C++

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

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

**Page:** 78

---

## [BindAxis function delegate with more than one parameter?](https://forums.unrealengine.com/t/bindaxis-function-delegate-with-more-than-one-parameter/488199)

<div class="topic-metadata">

**Author:** [@MarceloGAquiris](https://forums.unrealengine.com/u/MarceloGAquiris)\
**Replies:** 3\
**Last updated:** [October 9, 2024, 9:38am UTC](https://forums.unrealengine.com/t/bindaxis-function-delegate-with-more-than-one-parameter/488199 "2024-10-09T09:38:55Z")

</div>

Is there a way to have two parameters, instead of the usual float parameter, for delegate functions of an Axis input? It is like the solution given here, but with a BindAxis? Like: void ARecActor::SetupPlayerInputCompon…

---

## [Geometry Script Displacement issue C++?](https://forums.unrealengine.com/t/geometry-script-displacement-issue-c/2053149)

<div class="topic-metadata">

**Author:** [@Devesh\_Singh\_Jadaun](https://forums.unrealengine.com/u/Devesh_Singh_Jadaun)\
**Replies:** 2\
**Last updated:** [October 9, 2024, 8:38am UTC](https://forums.unrealengine.com/t/geometry-script-displacement-issue-c/2053149 "2024-10-09T08:38:12Z")

</div>

Am new to c++ coding, trying to subdivide a dynamic mesh and also displace via a displacement map. The code throws a bunch of errors. Here’s thecode:

---

## [How to resimulate Procedural Foliage programatically at runtime](https://forums.unrealengine.com/t/how-to-resimulate-procedural-foliage-programatically-at-runtime/2059519)

<div class="topic-metadata">

**Author:** [@Samssonart](https://forums.unrealengine.com/u/Samssonart)\
**Replies:** 0\
**Last updated:** [October 9, 2024, 1:43am UTC](https://forums.unrealengine.com/t/how-to-resimulate-procedural-foliage-programatically-at-runtime/2059519 "2024-10-09T01:43:06Z")

</div>

I’m working on a feature to move my procedural foliage generator to the player’s position when certain conditions are met. I’ve got this code so far. I compiles and runs, but no foliage is generated. void AddFoliageInst…

---

## [Can someone point me at an ONNX model that works with UE 5.4?](https://forums.unrealengine.com/t/can-someone-point-me-at-an-onnx-model-that-works-with-ue-5-4/2059336)

<div class="topic-metadata">

**Author:** [@Cyberqat](https://forums.unrealengine.com/u/Cyberqat)\
**Replies:** 0\
**Last updated:** [October 8, 2024, 9:55pm UTC](https://forums.unrealengine.com/t/can-someone-point-me-at-an-onnx-model-that-works-with-ue-5-4/2059336 "2024-10-08T21:55:34Z")

</div>

I am trying to test my NNE BP Library plugin and I’m getting a windows level exception deep within the model optimizer :frowning: Can someone point me at a pre-cooked model they know works with NNE? Thanks

---

## [How to Make a Texture 2D Array during Runtime in c++? Or Texture Atlas](https://forums.unrealengine.com/t/how-to-make-a-texture-2d-array-during-runtime-in-c-or-texture-atlas/2059221)

<div class="topic-metadata">

**Author:** [@FiscalFlipper1](https://forums.unrealengine.com/u/FiscalFlipper1)\
**Replies:** 1\
**Last updated:** [October 8, 2024, 9:36pm UTC](https://forums.unrealengine.com/t/how-to-make-a-texture-2d-array-during-runtime-in-c-or-texture-atlas/2059221 "2024-10-08T21:36:35Z")

</div>

Hello everyone, I’m trying to combine several individual textures into one, either with a Texture 2D Array or a Texture 2D, but I can’t find the correct way to do it. I wrote this code I found where they copy the data f…

---

## [Cant make a a Texture Array at runtime?](https://forums.unrealengine.com/t/cant-make-a-a-texture-array-at-runtime/157889)

<div class="topic-metadata">

**Author:** [@somawheels](https://forums.unrealengine.com/u/somawheels)\
**Replies:** 2\
**Last updated:** [October 8, 2024, 7:39pm UTC](https://forums.unrealengine.com/t/cant-make-a-a-texture-array-at-runtime/157889 "2024-10-08T19:39:17Z")

</div>

Does anyone know how to create a new texture array at runtime? I have tried this: UTexture2DArray\* textureArray = NewObject\<UTexture2DArray\>(); UTexture2D\* tex0 = UTexture2D::CreateTransient(104, 104, PF\_B8G8R8A8); te…

---

## [How can I make a Pawn's rotation to obey its parent's transform?](https://forums.unrealengine.com/t/how-can-i-make-a-pawns-rotation-to-obey-its-parents-transform/2058802)

<div class="topic-metadata">

**Author:** [@ppffpp](https://forums.unrealengine.com/u/ppffpp)\
**Replies:** 3\
**Last updated:** [October 8, 2024, 4:01pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-pawns-rotation-to-obey-its-parents-transform/2058802 "2024-10-08T16:01:52Z")

</div>

Hi! To demonstrate my problem, I’ve created a very simple scene: In this scene, I have a Cube, and parented under the Cube, there is a Cone and a Pawn. The Cube rotates: When I start the game, the Cone and the …

---

## [How To dynamically create a static mesh and generate SDF data in editor?](https://forums.unrealengine.com/t/how-to-dynamically-create-a-static-mesh-and-generate-sdf-data-in-editor/2058695)

<div class="topic-metadata">

**Author:** [@RagNA\_BE](https://forums.unrealengine.com/u/RagNA_BE)\
**Replies:** 0\
**Last updated:** [October 8, 2024, 1:52pm UTC](https://forums.unrealengine.com/t/how-to-dynamically-create-a-static-mesh-and-generate-sdf-data-in-editor/2058695 "2024-10-08T13:52:59Z")

</div>

I attempted to dynamically create a static mesh in editor and save it into the level asset, but the SDF data is only correctly generated after reloading the level and setting ‘bGenerateMeshDistanceField’ on. This causes …

---

## [Why can not LineTraceSingleByChannel work on ChaoVehicle's wheel?](https://forums.unrealengine.com/t/why-can-not-linetracesinglebychannel-work-on-chaovehicles-wheel/2058651)

<div class="topic-metadata">

**Author:** [@PeizeLi](https://forums.unrealengine.com/u/PeizeLi)\
**Replies:** 0\
**Last updated:** [October 8, 2024, 1:22pm UTC](https://forums.unrealengine.com/t/why-can-not-linetracesinglebychannel-work-on-chaovehicles-wheel/2058651 "2024-10-08T13:22:05Z")

</div>

I use the LineTraceSingleByChannel to get the pixels of the vehicle and map the result to the pixel plane, but it doesn’t seem to work for the wheels, I don’t know why, can anyone help me? this is my cpp code: for (int…

---

## [I can't convert InputComponent to UMyInputComponent which I derived from UEnhancedInputComponent](https://forums.unrealengine.com/t/i-cant-convert-inputcomponent-to-umyinputcomponent-which-i-derived-from-uenhancedinputcomponent/2058629)

<div class="topic-metadata">

**Author:** [@XX\_NaViN\_XX](https://forums.unrealengine.com/u/XX_NaViN_XX)\
**Replies:** 0\
**Last updated:** [October 8, 2024, 1:06pm UTC](https://forums.unrealengine.com/t/i-cant-convert-inputcomponent-to-umyinputcomponent-which-i-derived-from-uenhancedinputcomponent/2058629 "2024-10-08T13:06:05Z")

</div>

---

## [How To define a function with multiple return values as blueprint in C++](https://forums.unrealengine.com/t/how-to-define-a-function-with-multiple-return-values-as-blueprint-in-c/16934)

<div class="topic-metadata">

**Author:** [@prcn3dlight](https://forums.unrealengine.com/u/prcn3dlight)\
**Replies:** 4\
**Last updated:** [October 8, 2024, 12:17pm UTC](https://forums.unrealengine.com/t/how-to-define-a-function-with-multiple-return-values-as-blueprint-in-c/16934 "2024-10-08T12:17:27Z")

</div>

Hello, Community! I am working on some functions that can be used in both C++ and blueprints. I need some functions to be returned with multiple values. I know I can define a struct whenever I need multiple values to b…

---

## [Compilation for shipping fails even though using #if WITH\_EDITOR](https://forums.unrealengine.com/t/compilation-for-shipping-fails-even-though-using-if-with-editor/2056996)

<div class="topic-metadata">

**Author:** [@NEVQ151](https://forums.unrealengine.com/u/NEVQ151)\
**Replies:** 8\
**Last updated:** [October 8, 2024, 6:25am UTC](https://forums.unrealengine.com/t/compilation-for-shipping-fails-even-though-using-if-with-editor/2056996 "2024-10-08T06:25:05Z")

</div>

Hi, we are trying to run some editor only code with Blutility, but the code keeps generating compiler errors, even though it is wrapped in the #if WITH\_EDITOR directive. I also tried WITH\_EDITORONLY\_DATA without success…

---

## [Someone else has problems with AddIgnoredActor() ?](https://forums.unrealengine.com/t/someone-else-has-problems-with-addignoredactor/137801)

<div class="topic-metadata">

**Author:** [@CrueL875](https://forums.unrealengine.com/u/CrueL875)\
**Replies:** 3\
**Last updated:** [October 8, 2024, 1:08am UTC](https://forums.unrealengine.com/t/someone-else-has-problems-with-addignoredactor/137801 "2024-10-08T01:08:54Z")

</div>

Hello, I’m using Unreal Engine 4.24.2 and the LineTrace doesn’t ignore my Actor. Is that a bug? AActor\* ALineTrace::LineTraceSingle(FVector Start, FVector End) { FHitResult HitResult; FCollisionObjectQueryPa…

---

## [Revision control using perforce does not sync my C++ code](https://forums.unrealengine.com/t/revision-control-using-perforce-does-not-sync-my-c-code/2057682)

<div class="topic-metadata">

**Author:** [@EarthHobbit](https://forums.unrealengine.com/u/EarthHobbit)\
**Replies:** 1\
**Last updated:** [October 7, 2024, 8:31pm UTC](https://forums.unrealengine.com/t/revision-control-using-perforce-does-not-sync-my-c-code/2057682 "2024-10-07T20:31:15Z")

</div>

I have a Blueprint project with perforce revision control which is working well. However all the C++ code I have added is not synchronized. How to instruct unreal / perforce to take it into account ? I’m on a Mac. Thanks …

---

## [Reference Error with Third-Party Library \[Chromium Embedded Framework\]](https://forums.unrealengine.com/t/reference-error-with-third-party-library-chromium-embedded-framework/2057338)

<div class="topic-metadata">

**Author:** [@akameCE](https://forums.unrealengine.com/u/akameCE)\
**Replies:** 0\
**Last updated:** [October 7, 2024, 3:37pm UTC](https://forums.unrealengine.com/t/reference-error-with-third-party-library-chromium-embedded-framework/2057338 "2024-10-07T15:37:54Z")

</div>

Overview: To implement browser functionality within the UE5.4 game, I attempted to include the third-party library CEF (Chromium Embedded Framework) and build the project. However, the build failed with the following er…

---

## [how to hide a UClass from any subgruop.](https://forums.unrealengine.com/t/how-to-hide-a-uclass-from-any-subgruop/2057240)

<div class="topic-metadata">

**Author:** [@JulioJerez](https://forums.unrealengine.com/u/JulioJerez)\
**Replies:** 3\
**Last updated:** [October 7, 2024, 3:37pm UTC](https://forums.unrealengine.com/t/how-to-hide-a-uclass-from-any-subgruop/2057240 "2024-10-07T15:37:08Z")

</div>

Suppose, I have a class that serve as the base for a family of similar objects, say a furniture. the form the base class the user can select diffrent king of furniture to populate a room, ex: chairs, tables, sofas, etc…

---

## [C++ Header File Problem, Using 2 classes in one file](https://forums.unrealengine.com/t/c-header-file-problem-using-2-classes-in-one-file/2056465)

<div class="topic-metadata">

**Author:** [@pTv271](https://forums.unrealengine.com/u/pTv271)\
**Replies:** 1\
**Last updated:** [October 7, 2024, 1:13pm UTC](https://forums.unrealengine.com/t/c-header-file-problem-using-2-classes-in-one-file/2056465 "2024-10-07T13:13:01Z")

</div>

For Context I am trying to build a custom unreal 5.2 blueprint node that takes in a map variable which has its Key set to Name variable and Values to float , The custom node will show a dropdown selection for the keys a…

---

## [Using Timers inside of Lambda functions](https://forums.unrealengine.com/t/using-timers-inside-of-lambda-functions/2052165)

<div class="topic-metadata">

**Author:** [@Fordy2341](https://forums.unrealengine.com/u/Fordy2341)\
**Replies:** 2\
**Last updated:** [October 6, 2024, 10:37am UTC](https://forums.unrealengine.com/t/using-timers-inside-of-lambda-functions/2052165 "2024-10-06T10:37:13Z")

</div>

I am using a WebSocket and applying a Lambda to the OnMessage callback. Socket-\>OnMessage().AddLambda(\[&\](const FString& Message) { if (IsValid(this)) { this-\>StartHeartbeat(); …

---

## [How to complie cryptopp lib ? ](https://forums.unrealengine.com/t/how-to-complie-cryptopp-lib/2055017)

<div class="topic-metadata">

**Author:** [@Draracle.Wray](https://forums.unrealengine.com/u/Draracle.Wray)\
**Replies:** 1\
**Last updated:** [October 6, 2024, 6:57am UTC](https://forums.unrealengine.com/t/how-to-complie-cryptopp-lib/2055017 "2024-10-06T06:57:04Z")

</div>

Hello, guys: I try to add cryptopp lib into UE5.4 project as a module, but while I compile the source, I received so many errors in building log. these errors shows like this: 1\>D:\\UEProject\\Dawn\\Source\\cryptopp\\code\\…

---

## [\[UE 4.24\] Drag and Drop Windows Files to UE4 Project Under Runtime and Get Dropped File Paths.](https://forums.unrealengine.com/t/ue-4-24-drag-and-drop-windows-files-to-ue4-project-under-runtime-and-get-dropped-file-paths/143163)

<div class="topic-metadata">

**Author:** [@Dash-POWER](https://forums.unrealengine.com/u/Dash-POWER)\
**Replies:** 4\
**Last updated:** [October 5, 2024, 10:46pm UTC](https://forums.unrealengine.com/t/ue-4-24-drag-and-drop-windows-files-to-ue4-project-under-runtime-and-get-dropped-file-paths/143163 "2024-10-05T22:46:41Z")

</div>

Hello, I have question if it’s possible to drag and drop file/files to shipped UE4 project and gives the engine an array of path strings of files which were dropped. (C:\\MyFile.txt,C:\\MySecondFile.png…) I have found ex…

---

## [How to "rebuild" my project for include a plugin?](https://forums.unrealengine.com/t/how-to-rebuild-my-project-for-include-a-plugin/324613)

<div class="topic-metadata">

**Author:** [@Alec](https://forums.unrealengine.com/u/Alec)\
**Replies:** 7\
**Last updated:** [July 31, 2022, 8:49pm UTC](https://forums.unrealengine.com/t/how-to-rebuild-my-project-for-include-a-plugin/324613 "2022-07-31T20:49:15Z")

</div>

Hi all, I m trying to apply this tutorial : I copy/past the 2 folders ( in plug developper; and my content ), but I don't know how to "generate project file" In the video, he has a .bat file ( generateprojectfile.bat …

---

## [How do you get an line trace hit actor's Gameplay Tags](https://forums.unrealengine.com/t/how-do-you-get-an-line-trace-hit-actors-gameplay-tags/2053984)

<div class="topic-metadata">

**Author:** [@Kaiju\_1](https://forums.unrealengine.com/u/Kaiju_1)\
**Replies:** 3\
**Last updated:** [October 5, 2024, 7:19pm UTC](https://forums.unrealengine.com/t/how-do-you-get-an-line-trace-hit-actors-gameplay-tags/2053984 "2024-10-05T19:19:32Z")

</div>

I am simply looking for the way to check if an actor pinged by a line trace is assigned a certain Gameplay tag. the tag is defined like this: //in .h UE\_DECLARE\_GAMEPLAY\_TAG\_EXTERN(WallRunWallTag); // in .cpp UE\_DEFIN…

---

## [Having Trouble Adding C++ Functionality](https://forums.unrealengine.com/t/having-trouble-adding-c-functionality/2053085)

<div class="topic-metadata">

**Author:** [@EladMagdasi](https://forums.unrealengine.com/u/EladMagdasi)\
**Replies:** 4\
**Last updated:** [October 5, 2024, 6:19pm UTC](https://forums.unrealengine.com/t/having-trouble-adding-c-functionality/2053085 "2024-10-05T18:19:32Z")

</div>

Hey everyone, I am trying for the first time to add some C++ classes to my UE game. Following some guides I created the new class, added the relevant code to the .cpp and .h files. Then did a rebuild. There were some…

---

## [Is there a better way to create StaticMeshComponent Runtime and async load StaticMesh in C++?](https://forums.unrealengine.com/t/is-there-a-better-way-to-create-staticmeshcomponent-runtime-and-async-load-staticmesh-in-c/2046518)

<div class="topic-metadata">

**Author:** [@steknika](https://forums.unrealengine.com/u/steknika)\
**Replies:** 5\
**Last updated:** [October 5, 2024, 7:38am UTC](https://forums.unrealengine.com/t/is-there-a-better-way-to-create-staticmeshcomponent-runtime-and-async-load-staticmesh-in-c/2046518 "2024-10-05T07:38:48Z")

</div>

Hello everyone! I was trying to find a more optimal way to add a StaticMesh to my Player SkeletalMeshComponents socket at runtime, but I coudn’t seem to find a shorter way to do so. void APlayableCharacter::OnMeleeWeap…

---

## [How do I view logs in standalone mode?](https://forums.unrealengine.com/t/how-do-i-view-logs-in-standalone-mode/461715)

<div class="topic-metadata">

**Author:** [@awugucn](https://forums.unrealengine.com/u/awugucn)\
**Replies:** 3\
**Last updated:** [October 4, 2024, 10:55pm UTC](https://forums.unrealengine.com/t/how-do-i-view-logs-in-standalone-mode/461715 "2024-10-04T22:55:54Z")

</div>

How do I view logs in standalone mode? the log window can not see the game log

---

## [Component Visualizer Hit Proxy Crash - Passed UActorComponent eaten by GC](https://forums.unrealengine.com/t/component-visualizer-hit-proxy-crash-passed-uactorcomponent-eaten-by-gc/2051566)

<div class="topic-metadata">

**Author:** [@commontounge](https://forums.unrealengine.com/u/commontounge)\
**Replies:** 3\
**Last updated:** [October 4, 2024, 8:59pm UTC](https://forums.unrealengine.com/t/component-visualizer-hit-proxy-crash-passed-uactorcomponent-eaten-by-gc/2051566 "2024-10-04T20:59:09Z")

</div>

Hiya! I’m making a custom component interface for branching structures and basing the implementation on SplineComponentVisualizer. Generally things work as expected but I’m stumped by this bug - occasionally I get a cra…

---

## [HotReload Replacement on 5.x on Mac/XCode](https://forums.unrealengine.com/t/hotreload-replacement-on-5-x-on-mac-xcode/1788708)

<div class="topic-metadata">

**Author:** [@eagletree](https://forums.unrealengine.com/u/eagletree)\
**Replies:** 2\
**Last updated:** [October 4, 2024, 3:26pm UTC](https://forums.unrealengine.com/t/hotreload-replacement-on-5-x-on-mac-xcode/1788708 "2024-10-04T15:26:33Z")

</div>

I decided I’d ask this to see if there was something available to those on Mac/XCode to replace the function of HotReload, as it’s fairly time consuming to restart the editor after every compile. My code compiles in a fe…

---

## [Meta Quest 3](https://forums.unrealengine.com/t/meta-quest-3/2053068)

<div class="topic-metadata">

**Author:** [@MoIdrisVis](https://forums.unrealengine.com/u/MoIdrisVis)\
**Replies:** 0\
**Last updated:** [October 4, 2024, 3:14pm UTC](https://forums.unrealengine.com/t/meta-quest-3/2053068 "2024-10-04T15:14:00Z")

</div>

Hello everyone,I built a model and used it in VR, and I am using the Meta Quest 3. Everything is working fine, but how can I save this model on the Meta Quest or maybe display it on a website or something like that so I …

---

## [how i pass param for sub process when i use waitAndFork](https://forums.unrealengine.com/t/how-i-pass-param-for-sub-process-when-i-use-waitandfork/1910959)

<div class="topic-metadata">

**Author:** [@DJkarlHarris](https://forums.unrealengine.com/u/DJkarlHarris)\
**Replies:** 1\
**Last updated:** [October 4, 2024, 3:12pm UTC](https://forums.unrealengine.com/t/how-i-pass-param-for-sub-process-when-i-use-waitandfork/1910959 "2024-10-04T15:12:21Z")

</div>

The code proposes to use a directory address this is my directory structure,path:…/288250797249363969 the config content is -server -ExecCmds=“t.MaxFPS 25” -nothreading params are saved in the file which named conf…

---

## [How to set up fast array serializer replication?](https://forums.unrealengine.com/t/how-to-set-up-fast-array-serializer-replication/2052749)

<div class="topic-metadata">

**Author:** [@Supermatta321](https://forums.unrealengine.com/u/Supermatta321)\
**Replies:** 0\
**Last updated:** [October 4, 2024, 11:16am UTC](https://forums.unrealengine.com/t/how-to-set-up-fast-array-serializer-replication/2052749 "2024-10-04T11:16:22Z")

</div>

How do I set up fast array serializer replication in cpp? Cant get it working…

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

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