# C++

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

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

**Page:** 88

---

## [Get Random Reachable Point In Radius from C++, but refuses to compile?](https://forums.unrealengine.com/t/get-random-reachable-point-in-radius-from-c-but-refuses-to-compile/1983409)

<div class="topic-metadata">

**Author:** [@Krileon](https://forums.unrealengine.com/u/Krileon)\
**Replies:** 2\
**Last updated:** [August 19, 2024, 9:57pm UTC](https://forums.unrealengine.com/t/get-random-reachable-point-in-radius-from-c-but-refuses-to-compile/1983409 "2024-08-19T21:57:27Z")

</div>

I’m absolutely struggling to get this to work. I don’t know what I’m missing here. For context I’m in Notepad++ because Visual Studio makes me want to walk into traffic. So it’s difficulty to check what headers to includ…

---

## [GetLifeTimeReplicatedProps overrides](https://forums.unrealengine.com/t/getlifetimereplicatedprops-overrides/76770)

<div class="topic-metadata">

**Author:** [@ShirtyKezRat](https://forums.unrealengine.com/u/ShirtyKezRat)\
**Replies:** 2\
**Last updated:** [August 19, 2024, 9:31pm UTC](https://forums.unrealengine.com/t/getlifetimereplicatedprops-overrides/76770 "2024-08-19T21:31:50Z")

</div>

I have a question regarding GetLifeTimeReplicatedProps. Can you change conditions for replication for subclasses? Is this supported? If so what is the intended way to go about this? Do i need to bypass parent which def…

---

## [Why are my pixels blurry](https://forums.unrealengine.com/t/why-are-my-pixels-blurry/1983295)

<div class="topic-metadata">

**Author:** [@Rancid\_Poncho](https://forums.unrealengine.com/u/Rancid_Poncho)\
**Replies:** 2\
**Last updated:** [August 19, 2024, 8:12pm UTC](https://forums.unrealengine.com/t/why-are-my-pixels-blurry/1983295 "2024-08-19T20:12:09Z")

</div>

I’ve been trying to create a pixelated effect that also improves performance, but after setting r.ScreenPercentage 10 and r.AntiAliasingMethod 0, the image is incredibly blurry: Is the only crossplatform way of accom…

---

## [How to get a bone location for the first frame of an AnimMontage?](https://forums.unrealengine.com/t/how-to-get-a-bone-location-for-the-first-frame-of-an-animmontage/18818)

<div class="topic-metadata">

**Author:** [@Emidee](https://forums.unrealengine.com/u/Emidee)\
**Replies:** 14\
**Last updated:** [August 19, 2024, 2:39pm UTC](https://forums.unrealengine.com/t/how-to-get-a-bone-location-for-the-first-frame-of-an-animmontage/18818 "2024-08-19T14:39:04Z")

</div>

Hello, In my game, I need to attach an actor to the bone of a skeletal mesh. Depending on the situations, the bone I attach the actor to is placed differently, depending on the section I wish to play in the montage. I …

---

## [How to disable physics/cooking for UProceduralMeshComponent C++](https://forums.unrealengine.com/t/how-to-disable-physics-cooking-for-uproceduralmeshcomponent-c/133791)

<div class="topic-metadata">

**Author:** [@tplewe](https://forums.unrealengine.com/u/tplewe)\
**Replies:** 1\
**Last updated:** [August 19, 2024, 11:31am UTC](https://forums.unrealengine.com/t/how-to-disable-physics-cooking-for-uproceduralmeshcomponent-c/133791 "2024-08-19T11:31:44Z")

</div>

I’ve got an actor with a UProceduralMeshComponent on which I do not want/need to waste resources with physics cooking, esp when it is high poly. This is from C++. I know I can set bUseAsyncCooking on the component to pus…

---

## [Actor with Projectile Movement Component trigger Component's OnHit even with object channel disabled](https://forums.unrealengine.com/t/actor-with-projectile-movement-component-trigger-components-onhit-even-with-object-channel-disabled/1981479)

<div class="topic-metadata">

**Author:** [@Angel\_l](https://forums.unrealengine.com/u/Angel_l)\
**Replies:** 1\
**Last updated:** [August 19, 2024, 12:22am UTC](https://forums.unrealengine.com/t/actor-with-projectile-movement-component-trigger-components-onhit-even-with-object-channel-disabled/1981479 "2024-08-19T00:22:27Z")

</div>

I have a projectile BP (editor tree below) that has simulate physics disabled and a projectile movement component attached, I have set the object channel Projectile as its Type in Collisions presets and the OnHit still t…

---

## [Clone / Share C++ Project](https://forums.unrealengine.com/t/clone-share-c-project/1949185)

<div class="topic-metadata">

**Author:** [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Replies:** 1\
**Last updated:** [August 18, 2024, 10:48am UTC](https://forums.unrealengine.com/t/clone-share-c-project/1949185 "2024-08-18T10:48:15Z")

</div>

I was having a really hard time finding a guide on how to clone or download an Unreal Engine project that uses C++ classes. Fortunately, I managed to figure it out myself and wanted to share my approach to guide others w…

---

## [How to change the SIZE of a progress bar at runtime, not the percentage that it is filled.](https://forums.unrealengine.com/t/how-to-change-the-size-of-a-progress-bar-at-runtime-not-the-percentage-that-it-is-filled/1971854)

<div class="topic-metadata">

**Author:** [@TheoRat3](https://forums.unrealengine.com/u/TheoRat3)\
**Replies:** 17\
**Last updated:** [August 17, 2024, 10:41pm UTC](https://forums.unrealengine.com/t/how-to-change-the-size-of-a-progress-bar-at-runtime-not-the-percentage-that-it-is-filled/1971854 "2024-08-17T22:41:46Z")

</div>

I am trying to make health and stamina bars that lengthen as the player levels up. Anyone know how I can change the horizontal size of a progress bar at runtime? (not its fill percentage) Or if a progress bar isn’t the w…

---

## [C++ Spawned actor on server not replicated on clients](https://forums.unrealengine.com/t/c-spawned-actor-on-server-not-replicated-on-clients/1980215)

<div class="topic-metadata">

**Author:** [@Steve\_Cover](https://forums.unrealengine.com/u/Steve_Cover)\
**Replies:** 15\
**Last updated:** [August 17, 2024, 9:35pm UTC](https://forums.unrealengine.com/t/c-spawned-actor-on-server-not-replicated-on-clients/1980215 "2024-08-17T21:35:54Z")

</div>

Hello everyone, I know this topic has been already treated, but I’m stuck on the simple task of spawning an Actor class (APickup derived from AActor) and replicate it. The Character spawns the Pickup actor as Server, b…

---

## [Instanced Static Mesh Component not rendering when instances are added through C++ \[RESOLVED\]](https://forums.unrealengine.com/t/instanced-static-mesh-component-not-rendering-when-instances-are-added-through-c-resolved/1980315)

<div class="topic-metadata">

**Author:** [@LunarSnail](https://forums.unrealengine.com/u/LunarSnail)\
**Replies:** 4\
**Last updated:** [August 17, 2024, 6:24pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-component-not-rendering-when-instances-are-added-through-c-resolved/1980315 "2024-08-17T18:24:38Z")

</div>

(Oops, made it a topic instead of a question) After refactoring a bit of code to work with a few global Instanced Static Mesh Components instead of spawning/destroying static mesh components, i’ve run into an issue. I …

---

## [UPROPERTY member vars reset to NULL by ObjectInitializer](https://forums.unrealengine.com/t/uproperty-member-vars-reset-to-null-by-objectinitializer/19959)

<div class="topic-metadata">

**Author:** [@chaosgrid](https://forums.unrealengine.com/u/chaosgrid)\
**Replies:** 25\
**Last updated:** [August 17, 2024, 1:28pm UTC](https://forums.unrealengine.com/t/uproperty-member-vars-reset-to-null-by-objectinitializer/19959 "2024-08-17T13:28:28Z")

</div>

Hello devs, does anybody have the same problem, UPROPERTY vars of an actor being reset to NULL after the constructor finishes? Check out more details here: I need the UPROPERTY because I want the components to be ed…

---

## [How to draw polygon in Slate or UMG？](https://forums.unrealengine.com/t/how-to-draw-polygon-in-slate-or-umg/85332)

<div class="topic-metadata">

**Author:** [@CppCode](https://forums.unrealengine.com/u/CppCode)\
**Replies:** 3\
**Last updated:** [August 17, 2024, 10:59am UTC](https://forums.unrealengine.com/t/how-to-draw-polygon-in-slate-or-umg/85332 "2024-08-17T10:59:37Z")

</div>

Hi, I have created a custom UI class, both Slate and UMG, they are SFenying(Slate) and Fenying(UMG), now I want to draw polygon in the custom UI by user clicking mouse, and I find some c++ function in HUD can do this, bu…

---

## [Switch game localization](https://forums.unrealengine.com/t/switch-game-localization/1979951)

<div class="topic-metadata">

**Author:** [@Inklipse08090](https://forums.unrealengine.com/u/Inklipse08090)\
**Replies:** 1\
**Last updated:** [August 17, 2024, 10:10am UTC](https://forums.unrealengine.com/t/switch-game-localization/1979951 "2024-08-17T10:10:44Z")

</div>

I have fully translated and compiled the translation, but how to switch localization correctly I have created ustructs containing ftext variables and pass localized variables to them #define LOCTEXT\_NAMESPACE "Eda" …

---

## [\[UE5.1.1\] How To Bind UI-Only Input Actions?](https://forums.unrealengine.com/t/ue5-1-1-how-to-bind-ui-only-input-actions/1528772)

<div class="topic-metadata">

**Author:** [@BadScientist89](https://forums.unrealengine.com/u/BadScientist89)\
**Replies:** 3\
**Last updated:** [August 17, 2024, 9:05am UTC](https://forums.unrealengine.com/t/ue5-1-1-how-to-bind-ui-only-input-actions/1528772 "2024-08-17T09:05:56Z")

</div>

I’m trying to set up my UI menus so that they have hotkeys that function only while the menu is open. Currently, I have an InputMappingContext and InputAction assigned to properties on the menu widget class. When the men…

---

## [Is it possible to draw a mesh without creating a new StaticMeshComponent every time?](https://forums.unrealengine.com/t/is-it-possible-to-draw-a-mesh-without-creating-a-new-staticmeshcomponent-every-time/1978733)

<div class="topic-metadata">

**Author:** [@LunarSnail](https://forums.unrealengine.com/u/LunarSnail)\
**Replies:** 8\
**Last updated:** [August 17, 2024, 8:04am UTC](https://forums.unrealengine.com/t/is-it-possible-to-draw-a-mesh-without-creating-a-new-staticmeshcomponent-every-time/1978733 "2024-08-17T08:04:52Z")

</div>

I currently have a system in which i can create a spline for meshes to follow (It will need to be possible for multiple different meshes to be mixed in, so i can’t easily use an InstancedStaticMeshComponent) and i feel l…

---

## [Clean Invalid Actors](https://forums.unrealengine.com/t/clean-invalid-actors/1979866)

<div class="topic-metadata">

**Author:** [@AreYouTheBot020](https://forums.unrealengine.com/u/AreYouTheBot020)\
**Replies:** 0\
**Last updated:** [August 17, 2024, 7:23am UTC](https://forums.unrealengine.com/t/clean-invalid-actors/1979866 "2024-08-17T07:23:39Z")

</div>

OK so I have a team member that was working on a worldwide sprint created several classes, and blueprints based on those classes. at some point they renamed one of the classes which was directly inherited by a blueprint…

---

## [DataAsset OOP is broken?](https://forums.unrealengine.com/t/dataasset-oop-is-broken/1978942)

<div class="topic-metadata">

**Author:** [@Cocokiller1990](https://forums.unrealengine.com/u/Cocokiller1990)\
**Replies:** 8\
**Last updated:** [August 16, 2024, 11:51pm UTC](https://forums.unrealengine.com/t/dataasset-oop-is-broken/1978942 "2024-08-16T23:51:26Z")

</div>

Why does this TMap array: TMap\<FName, TObjectPtr\<UCustomClass\>\> DataAsset; not seem to store instances of child classes derived from UCustomClass? It feels like it only accepts objects of the exact base class. I’m assi…

---

## [How to add nonvisual components to UserWidget](https://forums.unrealengine.com/t/how-to-add-nonvisual-components-to-userwidget/1976464)

<div class="topic-metadata">

**Author:** [@ryan\_motive](https://forums.unrealengine.com/u/ryan_motive)\
**Replies:** 9\
**Last updated:** [August 16, 2024, 9:49pm UTC](https://forums.unrealengine.com/t/how-to-add-nonvisual-components-to-userwidget/1976464 "2024-08-16T21:49:22Z")

</div>

Long time Unity dev moving some work over to Unreal. A pattern we use quite a lot in Unity is building out UI using small, reusable components that implement UX logic (say timers, network calls, etc.). We add these comp…

---

## [How to Find non native Functions and Event Dispatchers (BP Delegates) from C++?](https://forums.unrealengine.com/t/how-to-find-non-native-functions-and-event-dispatchers-bp-delegates-from-c/1939977)

<div class="topic-metadata">

**Author:** [@SKVVictor](https://forums.unrealengine.com/u/SKVVictor)\
**Replies:** 4\
**Last updated:** [August 16, 2024, 9:25pm UTC](https://forums.unrealengine.com/t/how-to-find-non-native-functions-and-event-dispatchers-bp-delegates-from-c/1939977 "2024-08-16T21:25:50Z")

</div>

Intro So I thought I’d try a little experiment and make an Actor Component that could expose it’s BP defined Event Dispatchers to streamline “level scripting”. The idea being when an actor instance is dropped in the wor…

---

## [How to launch a character both up and forward](https://forums.unrealengine.com/t/how-to-launch-a-character-both-up-and-forward/1942171)

<div class="topic-metadata">

**Author:** [@TheoRat3](https://forums.unrealengine.com/u/TheoRat3)\
**Replies:** 7\
**Last updated:** [August 16, 2024, 1:33pm UTC](https://forums.unrealengine.com/t/how-to-launch-a-character-both-up-and-forward/1942171 "2024-08-16T13:33:47Z")

</div>

I’m trying to create an aerial dodge mechanic that gives the character a slight vertical boost and launches them out of the way. I initially did this by adding an additional call to jump if the character is in the air an…

---

## [Pass Unknown Blueprint Enum to Cxx Function and Convert to String](https://forums.unrealengine.com/t/pass-unknown-blueprint-enum-to-cxx-function-and-convert-to-string/1977458)

<div class="topic-metadata">

**Author:** [@0x6c6565](https://forums.unrealengine.com/u/0x6c6565)\
**Replies:** 1\
**Last updated:** [August 16, 2024, 1:07pm UTC](https://forums.unrealengine.com/t/pass-unknown-blueprint-enum-to-cxx-function-and-convert-to-string/1977458 "2024-08-16T13:07:22Z")

</div>

Hallo, How might I go about creating a Cxx function in a Blueprint Library that accepts a BP created enum that I don’t know about? I would like to get the value as an FString inside of the method. Thank you,

---

## [UnrealVS extension for VS2022 crashes](https://forums.unrealengine.com/t/unrealvs-extension-for-vs2022-crashes/1196113)

<div class="topic-metadata">

**Author:** [@chrisaverage](https://forums.unrealengine.com/u/chrisaverage)\
**Replies:** 1\
**Last updated:** [August 16, 2024, 9:48am UTC](https://forums.unrealengine.com/t/unrealvs-extension-for-vs2022-crashes/1196113 "2024-08-16T09:48:46Z")

</div>

I’m using VS2022 v 17.6.2. The UnrealVS extension crashes whenever I try to interact with it in any way - press any button or open its settings page. The crash log shows this callstack: SetSite failed for package \[Unrea…

---

## [GetLifetimeReplicatedProps](https://forums.unrealengine.com/t/getlifetimereplicatedprops/299441)

<div class="topic-metadata">

**Author:** [@boredcoding\_1](https://forums.unrealengine.com/u/boredcoding_1)\
**Replies:** 4\
**Last updated:** [November 20, 2014, 2:32pm UTC](https://forums.unrealengine.com/t/getlifetimereplicatedprops/299441 "2014-11-20T14:32:51Z")

</div>

I think that’s a just a Visual Studio intellisense error squiggle - not an actual compiler error. Have you tried compiling?

---

## [FinishAnim() Equivalent](https://forums.unrealengine.com/t/finishanim-equivalent/1978071)

<div class="topic-metadata">

**Author:** [@ADayInForever](https://forums.unrealengine.com/u/ADayInForever)\
**Replies:** 0\
**Last updated:** [August 16, 2024, 5:56am UTC](https://forums.unrealengine.com/t/finishanim-equivalent/1978071 "2024-08-16T05:56:41Z")

</div>

Hello there, I am wondering if unreal C++ has its own equivalent of UE3’s FinishAnim() function? I am migrating my project from UE3 to the current one, and I have yet to find an equivalent function that pauses a charac…

---

## [Physics contraint component added on begein play c++ not working](https://forums.unrealengine.com/t/physics-contraint-component-added-on-begein-play-c-not-working/1977554)

<div class="topic-metadata">

**Author:** [@Theos82](https://forums.unrealengine.com/u/Theos82)\
**Replies:** 0\
**Last updated:** [August 15, 2024, 9:42pm UTC](https://forums.unrealengine.com/t/physics-contraint-component-added-on-begein-play-c-not-working/1977554 "2024-08-15T21:42:23Z")

</div>

Hello, I hope you all doing well. Recently I came across an issue where I wanted to make a door system that have constraints on openning and closing. But I wanted to setup it all on begein play ans c++ so I can scale th…

---

## [An error occured while trying to generate project files](https://forums.unrealengine.com/t/an-error-occured-while-trying-to-generate-project-files/344107)

<div class="topic-metadata">

**Author:** [@Derzo](https://forums.unrealengine.com/u/Derzo)\
**Replies:** 4\
**Last updated:** [August 15, 2024, 8:32pm UTC](https://forums.unrealengine.com/t/an-error-occured-while-trying-to-generate-project-files/344107 "2024-08-15T20:32:02Z")

</div>

When I try to generate project or generate new C++ class, it says this error. Some other people have been having this too, but I never solved it. Any help? My visual stud…

---

## [Code within #if WITH\_EDITOR running during package on 5.4 and Linux](https://forums.unrealengine.com/t/code-within-if-with-editor-running-during-package-on-5-4-and-linux/1869699)

<div class="topic-metadata">

**Author:** [@BenWeno](https://forums.unrealengine.com/u/BenWeno)\
**Replies:** 3\
**Last updated:** [August 15, 2024, 6:23pm UTC](https://forums.unrealengine.com/t/code-within-if-with-editor-running-during-package-on-5-4-and-linux/1869699 "2024-08-15T18:23:56Z")

</div>

We’re running a CI process to package builds when we push, and it’s been working fine in 5.3 on Windows, Mac, and Linux but since we updated to 5.4 we’re having issue with the Linux build only. From the logs, it appears …

---

## [Server-to-server communication.](https://forums.unrealengine.com/t/server-to-server-communication/1977028)

<div class="topic-metadata">

**Author:** [@Flicona\_Studio](https://forums.unrealengine.com/u/Flicona_Studio)\
**Replies:** 0\
**Last updated:** [August 15, 2024, 2:18pm UTC](https://forums.unrealengine.com/t/server-to-server-communication/1977028 "2024-08-15T14:18:54Z")

</div>

HELLO, I’ve been looking for a solution for several weeks. I have 2 dedicated servers, which I would like to communicate together, it is not a constant flow. This is why once used, I would like to close it. I would lik…

---

## [Converting string to enum](https://forums.unrealengine.com/t/converting-string-to-enum/55936)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_b9eba5b71](https://forums.unrealengine.com/u/anonymous_user_b9eba5b71)\
**Replies:** 16\
**Last updated:** [August 15, 2024, 2:12pm UTC](https://forums.unrealengine.com/t/converting-string-to-enum/55936 "2024-08-15T14:12:03Z")

</div>

This may seem like a weird question, but i have those strings that have been created with EnumToString node to populate a ComboBox, now i would like to get those ComboBox strings back to their respective enum so i can us…

---

## [UE5 third party plugin.](https://forums.unrealengine.com/t/ue5-third-party-plugin/1175812)

<div class="topic-metadata">

**Author:** [@TransporterXXL](https://forums.unrealengine.com/u/TransporterXXL)\
**Replies:** 4\
**Last updated:** [August 15, 2024, 1:27pm UTC](https://forums.unrealengine.com/t/ue5-third-party-plugin/1175812 "2024-08-15T13:27:19Z")

</div>

Hello all! I have been trying to add Fast-DDS (GitHub - eProsima/Fast-DDS: The most complete DDS - Proven: Plenty of success cases.) as a third party plugin to UE5 for some time now. I used the third party plugin templa…

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

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