# C++

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

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

**Page:** 41

---

## [line trace not working when running project in headless mode using -nullrhi flag](https://forums.unrealengine.com/t/line-trace-not-working-when-running-project-in-headless-mode-using-nullrhi-flag/2474227)

<div class="topic-metadata">

**Author:** [@gwh0014](https://forums.unrealengine.com/u/gwh0014)\
**Replies:** 0\
**Last updated:** [April 24, 2025, 4:26pm UTC](https://forums.unrealengine.com/t/line-trace-not-working-when-running-project-in-headless-mode-using-nullrhi-flag/2474227 "2025-04-24T16:26:37Z")

</div>

I have a project set up where I am running rl agents down a track and i am using line trace to dynamically place spline points as the maps are loaded into the game during runtime. when i do this normally by just hitting …

---

## [Build Error: OtherCompilationError when i create an Installed Build of Unreal Engine](https://forums.unrealengine.com/t/build-error-othercompilationerror-when-i-create-an-installed-build-of-unreal-engine/2474081)

<div class="topic-metadata">

**Author:** [@user\_6e7855fd5823267311c0f8735d75d878bdc7de7ff224d1bc55bd48](https://forums.unrealengine.com/u/user_6e7855fd5823267311c0f8735d75d878bdc7de7ff224d1bc55bd48)\
**Replies:** 0\
**Last updated:** [April 24, 2025, 2:49pm UTC](https://forums.unrealengine.com/t/build-error-othercompilationerror-when-i-create-an-installed-build-of-unreal-engine/2474081 "2025-04-24T14:49:38Z")

</div>

Hi folks, i am trying create an installed build of ue5.3 source. I run BuildGraph directly in the command-line from the Engine\\Build\\BatchFiles directory through the RunUAT batch file. the command is: “RunUAT.bat Buil…

---

## [Casting to Game Instances C++ ](https://forums.unrealengine.com/t/casting-to-game-instances-c/2473871)

<div class="topic-metadata">

**Author:** [@Haxosura](https://forums.unrealengine.com/u/Haxosura)\
**Replies:** 2\
**Last updated:** [April 24, 2025, 2:31pm UTC](https://forums.unrealengine.com/t/casting-to-game-instances-c/2473871 "2025-04-24T14:31:45Z")

</div>

I am Having problem when trying to cast to my Gamesinstance inside my player characters sprites. void AFYP\_MazeCharacter::StartSprint() { UFYP\_GameInstance\* GM = Cast\<UFYP\_GameInstance\>(UGameplayStatics::GetGameInstan…

---

## [Can't Build UE5.2.1 Release from Source - SDK Resolver Issue](https://forums.unrealengine.com/t/cant-build-ue5-2-1-release-from-source-sdk-resolver-issue/1345557)

<div class="topic-metadata">

**Author:** [@SteelShot](https://forums.unrealengine.com/u/SteelShot)\
**Replies:** 1\
**Last updated:** [April 24, 2025, 2:11pm UTC](https://forums.unrealengine.com/t/cant-build-ue5-2-1-release-from-source-sdk-resolver-issue/1345557 "2025-04-24T14:11:41Z")

</div>

Hello! I’m attempting to set up a dedicated server through the ue 5.2.1 source code. Unfortunately, I’ve been getting the following error: C:\\Users\\Name\\Desktop\\Projects\\AirplaneFootball\\DevFolder\\UnrealEngine-5.2.1-rel…

---

## [Why can’t the collision event of my projectiles be triggered on the client side in a multiplayer game after I changed the way of generating projectiles from direct spawning to using an object pool?  ](https://forums.unrealengine.com/t/why-can-t-the-collision-event-of-my-projectiles-be-triggered-on-the-client-side-in-a-multiplayer-game-after-i-changed-the-way-of-generating-projectiles-from-direct-spawning-to-using-an-object-pool/2471769)

<div class="topic-metadata">

**Author:** [@q1627962012](https://forums.unrealengine.com/u/q1627962012)\
**Replies:** 2\
**Last updated:** [April 24, 2025, 12:17pm UTC](https://forums.unrealengine.com/t/why-can-t-the-collision-event-of-my-projectiles-be-triggered-on-the-client-side-in-a-multiplayer-game-after-i-changed-the-way-of-generating-projectiles-from-direct-spawning-to-using-an-object-pool/2471769 "2025-04-24T12:17:13Z")

</div>

Why can’t the collision event of my projectiles be triggered on the client side in a multiplayer game after I changed the way of generating projectiles from direct spawning to using an object pool? Did I do something wro…

---

## [How to use Online Subsystem Google?](https://forums.unrealengine.com/t/how-to-use-online-subsystem-google/1327182)

<div class="topic-metadata">

**Author:** [@grisha666](https://forums.unrealengine.com/u/grisha666)\
**Replies:** 3\
**Last updated:** [April 23, 2025, 7:44pm UTC](https://forums.unrealengine.com/t/how-to-use-online-subsystem-google/1327182 "2025-04-23T19:44:33Z")

</div>

Hey did anyone used OnlineSubsystemGoogle? (not google play) I just need to make OAuth2 login with google account, but I cant understand from documentation where to setup credentials (like client\_id or redirect\_uri) what…

---

## [How to  decentralize a Gameplay camera? ](https://forums.unrealengine.com/t/how-to-decentralize-a-gameplay-camera/2471798)

<div class="topic-metadata">

**Author:** [@Valhallaeiru](https://forums.unrealengine.com/u/Valhallaeiru)\
**Replies:** 2\
**Last updated:** [April 23, 2025, 5:08pm UTC](https://forums.unrealengine.com/t/how-to-decentralize-a-gameplay-camera/2471798 "2025-04-23T17:08:52Z")

</div>

I am looking for a way to decentralize a camera. Basically I have one side of the screen occupied by a GUI, and I want the camera view to get squashed to the free side. Is there a way to do it?

---

## [How to safely use template structs?](https://forums.unrealengine.com/t/how-to-safely-use-template-structs/2469593)

<div class="topic-metadata">

**Author:** [@mrm\_dev](https://forums.unrealengine.com/u/mrm_dev)\
**Replies:** 5\
**Last updated:** [April 22, 2025, 8:58pm UTC](https://forums.unrealengine.com/t/how-to-safely-use-template-structs/2469593 "2025-04-22T20:58:43Z")

</div>

I have a template struct as such: template \<typename T\> struct FMyStruct { public: FMyStruct(UMyObject\*\* NewMyObj, T DefaultValue) { MyObj = NewMyObj; Value = DefaultValue }; void SetVal…

---

## [Linker Error: Multiple Definitions in freetype.lib(ftbase.obj) ps\_property\_get déjà défini(e) dans freetype.lib(ftbase.obj)](https://forums.unrealengine.com/t/linker-error-multiple-definitions-in-freetype-lib-ftbase-obj-ps-property-get-deja-defini-e-dans-freetype-lib-ftbase-obj/2469616)

<div class="topic-metadata">

**Author:** [@Lord-Upsilone](https://forums.unrealengine.com/u/Lord-Upsilone)\
**Replies:** 0\
**Last updated:** [April 22, 2025, 11:26am UTC](https://forums.unrealengine.com/t/linker-error-multiple-definitions-in-freetype-lib-ftbase-obj-ps-property-get-deja-defini-e-dans-freetype-lib-ftbase-obj/2469616 "2025-04-22T11:26:44Z")

</div>

Hi everyone, I’m encountering a linker error when building my Unreal Engine project. The error says that several symbols are already defined in freetype.lib(ftbase.obj). Here are some of the messages: FT\_Vector\_Unit al…

---

## [Sphere Trace For Objects in C++](https://forums.unrealengine.com/t/sphere-trace-for-objects-in-c/491564)

<div class="topic-metadata">

**Author:** [@berkanciger](https://forums.unrealengine.com/u/berkanciger)\
**Replies:** 10\
**Last updated:** [April 21, 2025, 11:44am UTC](https://forums.unrealengine.com/t/sphere-trace-for-objects-in-c/491564 "2025-04-21T11:44:07Z")

</div>

I added a new object channel named Point in Project Settings/Collision. I want to make Spehere Trace Single For Objects in C++. Basicly, i wanna do this in C++. I searched it for a while and i found this in Defau…

---

## [Do I have to use FObjectInitializer in constructor?](https://forums.unrealengine.com/t/do-i-have-to-use-fobjectinitializer-in-constructor/363383)

<div class="topic-metadata">

**Author:** [@wcl1993](https://forums.unrealengine.com/u/wcl1993)\
**Replies:** 5\
**Last updated:** [April 21, 2025, 11:17am UTC](https://forums.unrealengine.com/t/do-i-have-to-use-fobjectinitializer-in-constructor/363383 "2025-04-21T11:17:58Z")

</div>

I see some classes don’t have FObjectInitializer in their constructor, while others do. I wonder what the difference is here? Thanks, wcl1993

---

## [Can't find sessions with EOS](https://forums.unrealengine.com/t/cant-find-sessions-with-eos/2467633)

<div class="topic-metadata">

**Author:** [@Troglobytes](https://forums.unrealengine.com/u/Troglobytes)\
**Replies:** 2\
**Last updated:** [April 21, 2025, 10:00am UTC](https://forums.unrealengine.com/t/cant-find-sessions-with-eos/2467633 "2025-04-21T10:00:28Z")

</div>

Hi, With UE5.4, on Steam, I was able to create/find sessions by using custom functions in my code. I’m trying to get similar results as using the Advanced Sessions (without using the plugin) So far, everything’s good …

---

## [How to expose a member variables UPROPERTIES and edit in a blueprint of owning class](https://forums.unrealengine.com/t/how-to-expose-a-member-variables-uproperties-and-edit-in-a-blueprint-of-owning-class/2465542)

<div class="topic-metadata">

**Author:** [@xJBiRDx](https://forums.unrealengine.com/u/xJBiRDx)\
**Replies:** 3\
**Last updated:** [April 21, 2025, 3:04am UTC](https://forums.unrealengine.com/t/how-to-expose-a-member-variables-uproperties-and-edit-in-a-blueprint-of-owning-class/2465542 "2025-04-21T03:04:29Z")

</div>

Hi guys, I am implementing a Pickup Item in my current project and have stumbled across something I would really love to do but cannot figure out how to do. It is a very hard question to phrase so I will try to give a c…

---

## [I am getting strange crash and I don't understand why](https://forums.unrealengine.com/t/i-am-getting-strange-crash-and-i-dont-understand-why/2466424)

<div class="topic-metadata">

**Author:** [@MrSambuko](https://forums.unrealengine.com/u/MrSambuko)\
**Replies:** 1\
**Last updated:** [April 20, 2025, 11:32pm UTC](https://forums.unrealengine.com/t/i-am-getting-strange-crash-and-i-dont-understand-why/2466424 "2025-04-20T23:32:44Z")

</div>

Greetings. I’m still learning UE as my hobby and keep trying to make my own game. Recently I started encountering crash that I don’t know why is happening or how to solve. I will try to desribe system briefly. So all U…

---

## [datasmith revit converting coordinate systems](https://forums.unrealengine.com/t/datasmith-revit-converting-coordinate-systems/2466742)

<div class="topic-metadata">

**Author:** [@shayansep](https://forums.unrealengine.com/u/shayansep)\
**Replies:** 0\
**Last updated:** [April 20, 2025, 6:47pm UTC](https://forums.unrealengine.com/t/datasmith-revit-converting-coordinate-systems/2466742 "2025-04-20T18:47:12Z")

</div>

Hello guys, i built the Revit DataSmith exporter plugin from the git source file, but now when i export .udatasmith in Revit and import them in Unreal, the whole room is flipped in the Y axis, and all the normals are al…

---

## [Error: BeginPlay was called on actor which was in state 0](https://forums.unrealengine.com/t/error-beginplay-was-called-on-actor-which-was-in-state-0/2448819)

<div class="topic-metadata">

**Author:** [@VelikyPanda](https://forums.unrealengine.com/u/VelikyPanda)\
**Replies:** 1\
**Last updated:** [April 20, 2025, 6:35pm UTC](https://forums.unrealengine.com/t/error-beginplay-was-called-on-actor-which-was-in-state-0/2448819 "2025-04-20T18:35:40Z")

</div>

Hi, I’m getting this error in my log on an actor. Does anyone know what the problem might be? LogOutputDevice: Error: === Handled ensure: === LogOutputDevice: Error: Ensure condition failed: ActorHasBegunPlay == EActor…

---

## [TArray insertion invalidates contents](https://forums.unrealengine.com/t/tarray-insertion-invalidates-contents/2465059)

<div class="topic-metadata">

**Author:** [@Moon515](https://forums.unrealengine.com/u/Moon515)\
**Replies:** 3\
**Last updated:** [April 20, 2025, 5:38am UTC](https://forums.unrealengine.com/t/tarray-insertion-invalidates-contents/2465059 "2025-04-20T05:38:35Z")

</div>

I have a collection of pointers, UPROPERTY(VisibleAnywhere) TArray\<UOObjects\*\> arr; , and UOObject has a member array UPROPERTY(VisibleAnywhere) TArray\<AFOO\*\> the following code invalidates elements in the foos arra…

---

## [ContextualAnimScene, really weird design](https://forums.unrealengine.com/t/contextualanimscene-really-weird-design/2464273)

<div class="topic-metadata">

**Author:** [@TheArrow20](https://forums.unrealengine.com/u/TheArrow20)\
**Replies:** 0\
**Last updated:** [April 19, 2025, 8:22am UTC](https://forums.unrealengine.com/t/contextualanimscene-really-weird-design/2464273 "2025-04-19T08:22:55Z")

</div>

Hello, I find the ContextualAnimScene having a really weird design. Assuming a leader of the interaction can have multiple actor interacting with him, I can’t understand why the RepLateJoinData is not designed to handl…

---

## [Cascade raycast](https://forums.unrealengine.com/t/cascade-raycast/2453531)

<div class="topic-metadata">

**Author:** [@pyramidal](https://forums.unrealengine.com/u/pyramidal)\
**Replies:** 3\
**Last updated:** [April 18, 2025, 10:31pm UTC](https://forums.unrealengine.com/t/cascade-raycast/2453531 "2025-04-18T22:31:32Z")

</div>

Hi, I would like to code a cascading raycast like this: Source point = position of the emitting object I choose 4 directions (I could have chosen a different number) Four raycasts are generated from this source point…

---

## [Dynamically created component not visible/editable in components window](https://forums.unrealengine.com/t/dynamically-created-component-not-visible-editable-in-components-window/438010)

<div class="topic-metadata">

**Author:** [@WeiLiang](https://forums.unrealengine.com/u/WeiLiang)\
**Replies:** 7\
**Last updated:** [April 18, 2025, 3:39pm UTC](https://forums.unrealengine.com/t/dynamically-created-component-not-visible-editable-in-components-window/438010 "2025-04-18T15:39:11Z")

</div>

Hi All, I am trying to dynamically create and attach a component to my custom component. The issue is the component created does not show in editor, specifically the component window. As shown in this image, a box c…

---

## [Compile plugin error C3855](https://forums.unrealengine.com/t/compile-plugin-error-c3855/2457504)

<div class="topic-metadata">

**Author:** [@MB.P](https://forums.unrealengine.com/u/MB.P)\
**Replies:** 1\
**Last updated:** [April 18, 2025, 8:01am UTC](https://forums.unrealengine.com/t/compile-plugin-error-c3855/2457504 "2025-04-18T08:01:21Z")

</div>

version 5.5.4 When I compile my plugin, get error like this: 0\>WeakFieldPtr.h(74): Error C3855 : “operator ==”: 模板 参数“\_\_formal”与声明不兼容 0\>WeakFieldPtr.h(74): Reference : 模板实例化上下文(最早的实例化上下文)为 0\>SKismetInspector.h(178): …

---

## [How to use a static mesh as it's own collision? (At runtime in C++)](https://forums.unrealengine.com/t/how-to-use-a-static-mesh-as-its-own-collision-at-runtime-in-c/2253116)

<div class="topic-metadata">

**Author:** [@TimeWinder2](https://forums.unrealengine.com/u/TimeWinder2)\
**Replies:** 4\
**Last updated:** [April 17, 2025, 11:08pm UTC](https://forums.unrealengine.com/t/how-to-use-a-static-mesh-as-its-own-collision-at-runtime-in-c/2253116 "2025-04-17T23:08:17Z")

</div>

For a procedurally generated terrain, I’m generating a static mesh at runtime in C++, which the player is intended to be able to walk on. I’m using FStaticMeshBuilder as shown below. This “works” in that it correctly …

---

## [FRWLock unexpected deadlock on read reentry](https://forums.unrealengine.com/t/frwlock-unexpected-deadlock-on-read-reentry/2456989)

<div class="topic-metadata">

**Author:** [@fgagnon\_ms](https://forums.unrealengine.com/u/fgagnon_ms)\
**Replies:** 2\
**Last updated:** [April 17, 2025, 6:13pm UTC](https://forums.unrealengine.com/t/frwlock-unexpected-deadlock-on-read-reentry/2456989 "2025-04-17T18:13:57Z")

</div>

I stumbled upon a weird FRWLock behavior today. This code snippet recreates the scenario and ends up deadlock in the following state: WriteThreadState::WaitingForLock ReadThreadState::ReadLockedTrice\_Reentry\_AfterWrit…

---

## [Can't solve a linker error developing a Custom Editor Mode](https://forums.unrealengine.com/t/cant-solve-a-linker-error-developing-a-custom-editor-mode/605981)

<div class="topic-metadata">

**Author:** [@lucho1](https://forums.unrealengine.com/u/lucho1)\
**Replies:** 7\
**Last updated:** [April 17, 2025, 3:33am UTC](https://forums.unrealengine.com/t/cant-solve-a-linker-error-developing-a-custom-editor-mode/605981 "2025-04-17T03:33:09Z")

</div>

Hi! I’m doing a custom Editor Mode for UE5 through a EditorModeTool module class (inherits from ITemplateModuleListener). However I have a “unresolved external” linker error since some time ago that I can’t still figur…

---

## [MoveToActor and MoveToLocation Not Working in C++](https://forums.unrealengine.com/t/movetoactor-and-movetolocation-not-working-in-c/384577)

<div class="topic-metadata">

**Author:** [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Replies:** 12\
**Last updated:** [April 17, 2025, 12:59am UTC](https://forums.unrealengine.com/t/movetoactor-and-movetolocation-not-working-in-c/384577 "2025-04-17T00:59:31Z")

</div>

I have the following bit of code in my class extending AAIController: UE\_LOG(LogTemp, Warning, TEXT("MOVING TOWARDS CHARACTER %s AT POSITION %s"), \*TargetedCharacter-\>GetName(), \*TargetedCharacter-\>GetActorLocation().T…

---

## [Unreal Engine nonsensical code duplication shenanigans](https://forums.unrealengine.com/t/unreal-engine-nonsensical-code-duplication-shenanigans/2459014)

<div class="topic-metadata">

**Author:** [@OctoberIC](https://forums.unrealengine.com/u/OctoberIC)\
**Replies:** 4\
**Last updated:** [April 16, 2025, 4:46pm UTC](https://forums.unrealengine.com/t/unreal-engine-nonsensical-code-duplication-shenanigans/2459014 "2025-04-16T16:46:12Z")

</div>

Looking in “GenericPlatformMath.h”, just like in so many other places in Unreal Engine’s (8 million lines?) code base, I found pages of the following. My question is, where does this strange (and harmful) practice come …

---

## [Problem with adding IK Rig to my C++ project UE 5.4.4 ](https://forums.unrealengine.com/t/problem-with-adding-ik-rig-to-my-c-project-ue-5-4-4/2459928)

<div class="topic-metadata">

**Author:** [@GorodOgnei1337](https://forums.unrealengine.com/u/GorodOgnei1337)\
**Replies:** 0\
**Last updated:** [April 16, 2025, 4:26pm UTC](https://forums.unrealengine.com/t/problem-with-adding-ik-rig-to-my-c-project-ue-5-4-4/2459928 "2025-04-16T16:26:06Z")

</div>

Hello, I have encountered an unexpected for me problem of connecting plugins to C++ project in Unreal Engine 5.4.4. I am not experienced in Unreal Engine, so the problem may be trivial but I hope for your understanding. …

---

## [Logging in  ](https://forums.unrealengine.com/t/logging-in/2459611)

<div class="topic-metadata">

**Author:** [@Mattie20119834](https://forums.unrealengine.com/u/Mattie20119834)\
**Replies:** 1\
**Last updated:** [April 16, 2025, 3:41pm UTC](https://forums.unrealengine.com/t/logging-in/2459611 "2025-04-16T15:41:46Z")

</div>

I am in the wrong Fortnite account on my ps5. How can I get on to my old one back ?

---

## [How to attach inherited SceneComponent to a socket?](https://forums.unrealengine.com/t/how-to-attach-inherited-scenecomponent-to-a-socket/137420)

<div class="topic-metadata">

**Author:** [@Enchantsoft\_Inc](https://forums.unrealengine.com/u/Enchantsoft_Inc)\
**Replies:** 2\
**Last updated:** [April 16, 2025, 3:15pm UTC](https://forums.unrealengine.com/t/how-to-attach-inherited-scenecomponent-to-a-socket/137420 "2025-04-16T15:15:02Z")

</div>

Hi everyone! I’m a bit of a newbie at C++ and UE4, so I’ve been working on my knight/paladin character recently, and I’ve come across an error, hope you guys can help me out. So, on my character, I have a scenecomponen…

---

## [Is it possible to depend on a Game project's module in a UE4 Program project, and how to do it?](https://forums.unrealengine.com/t/is-it-possible-to-depend-on-a-game-projects-module-in-a-ue4-program-project-and-how-to-do-it/2459767)

<div class="topic-metadata">

**Author:** [@shen211](https://forums.unrealengine.com/u/shen211)\
**Replies:** 0\
**Last updated:** [April 16, 2025, 3:11pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-depend-on-a-game-projects-module-in-a-ue4-program-project-and-how-to-do-it/2459767 "2025-04-16T15:11:14Z")

</div>

Is it possible to depend on a Game project’s module in a UE4 Program project, and how to do it?

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

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