# \#fobjectfinder

**URL:** https://forums.unrealengine.com/tag/fobjectfinder/2537.md

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

---

## [Loading UBlueprint or Baseclass in Constructor](https://forums.unrealengine.com/t/loading-ublueprint-or-baseclass-in-constructor/489310)

<div class="topic-metadata">

**Author:** [@Jerry.Richards](https://forums.unrealengine.com/u/Jerry.Richards)\
**Replies:** 1\
**Last updated:** [October 3, 2021, 4:07pm UTC](https://forums.unrealengine.com/t/loading-ublueprint-or-baseclass-in-constructor/489310 "2021-10-03T16:07:15Z")

</div>

Currently I am loading weapons in the constructor using USkeletalMeshComponent’s. But I would like to change it to UBlueprint or prehaps the baseclass itself using FClassFinder/FObjectFinder. Unfortunately I am unable to…

---

## [FObjectFinder vs LoadObject](https://forums.unrealengine.com/t/fobjectfinder-vs-loadobject/420207)

<div class="topic-metadata">

**Author:** [@Arty-McLabin](https://forums.unrealengine.com/u/Arty-McLabin)\
**Replies:** 9\
**Last updated:** [September 5, 2021, 2:46pm UTC](https://forums.unrealengine.com/t/fobjectfinder-vs-loadobject/420207 "2021-09-05T14:46:32Z")

</div>

Let’s collect the differences between the two methods, as they don’t seem to be mentioned anywhere else. FObjectFinder is used in constructor, while LoadObject is used anywhere 2. Syntax difference: UMateri…

---

## [Problem with FObjectFinder Outside Constructor](https://forums.unrealengine.com/t/problem-with-fobjectfinder-outside-constructor/470466)

<div class="topic-metadata">

**Author:** [@ANLevant](https://forums.unrealengine.com/u/ANLevant)\
**Replies:** 3\
**Last updated:** [August 31, 2020, 6:36am UTC](https://forums.unrealengine.com/t/problem-with-fobjectfinder-outside-constructor/470466 "2020-08-31T06:36:42Z")

</div>

So this is my code: TSharedPtr\<FJsonObject\> JsonObject = MakeShareable(new FJsonObject()); TSharedRef\< TJsonReader\<\> \> JsonReader = TJsonReaderFactory\<\>::Create(\*response-\>GetContentAsString()); if (FJsonSerializer::…

---

## [FObjectFinder; make a generic function](https://forums.unrealengine.com/t/fobjectfinder-make-a-generic-function/468502)

<div class="topic-metadata">

**Author:** [@Gurulis99](https://forums.unrealengine.com/u/Gurulis99)\
**Replies:** 2\
**Last updated:** [July 23, 2020, 4:46pm UTC](https://forums.unrealengine.com/t/fobjectfinder-make-a-generic-function/468502 "2020-07-23T16:46:08Z")

</div>

Greetings, i want to make a generic function called FindAsset(FString name) which will return the object of the asset. Inside of it, i use the ConstructorHelper::FObjectFinder. Although everything is good, i cant put th…

---

## [How to spawn a particle system](https://forums.unrealengine.com/t/how-to-spawn-a-particle-system/468112)

<div class="topic-metadata">

**Author:** [@Boutta\_Be\_Banned](https://forums.unrealengine.com/u/Boutta_Be_Banned)\
**Replies:** 5\
**Last updated:** [July 14, 2020, 2:08pm UTC](https://forums.unrealengine.com/t/how-to-spawn-a-particle-system/468112 "2020-07-14T14:08:09Z")

</div>

I am trying to spawn an emitter using the explosion effect given in the starter content folder of UE4. I am trying to use static ConstructorHelpers::FObjectFinder\<UParticleSystem\> explosion(TEXT("/Game/FirstPerson/Partic…

---

## [ObjectFinder filepath failed to find](https://forums.unrealengine.com/t/objectfinder-filepath-failed-to-find/465845)

<div class="topic-metadata">

**Author:** [@ZorvexMaker](https://forums.unrealengine.com/u/ZorvexMaker)\
**Replies:** 2\
**Last updated:** [May 27, 2020, 7:33am UTC](https://forums.unrealengine.com/t/objectfinder-filepath-failed-to-find/465845 "2020-05-27T07:33:53Z")

</div>

Hi everyone! I’m trying to load the floor mesh from the starter content, but I’m getting a file path error. Any idea what the path is? This is my code, blast time is the SolutionDir. And this is the error I’m gettin…

---

## [How do you get a reference to a material in c++ outside of the constructor?](https://forums.unrealengine.com/t/how-do-you-get-a-reference-to-a-material-in-c-outside-of-the-constructor/459904)

<div class="topic-metadata">

**Author:** [@Mattlauk](https://forums.unrealengine.com/u/Mattlauk)\
**Replies:** 1\
**Last updated:** [December 25, 2019, 9:32pm UTC](https://forums.unrealengine.com/t/how-do-you-get-a-reference-to-a-material-in-c-outside-of-the-constructor/459904 "2019-12-25T21:32:50Z")

</div>

How do you get a reference to a material in c++ outside of the constructor? I tried ConstructorHelpers::FObjectFinder(PathToSolidMaterial).Object but it doesn’t work outside of a constructor.

---

## [How can I use FObjectFinder to set the property of a structure](https://forums.unrealengine.com/t/how-can-i-use-fobjectfinder-to-set-the-property-of-a-structure/381314)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_d251ba761](https://forums.unrealengine.com/u/anonymous_user_d251ba761)\
**Replies:** 1\
**Last updated:** [March 13, 2019, 1:47am UTC](https://forums.unrealengine.com/t/how-can-i-use-fobjectfinder-to-set-the-property-of-a-structure/381314 "2019-03-13T01:47:03Z")

</div>

I have a struct that I made called FInventorySlot. It needs to have two properties, one is an integer and the other is the class of a blueprint called BP\_PickUpItem\_MAIN. It is not a c++ class and inherits from another b…

---

## [How to simply play a sound?](https://forums.unrealengine.com/t/how-to-simply-play-a-sound/369347)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_ccd1615d](https://forums.unrealengine.com/u/anonymous_user_ccd1615d)\
**Replies:** 4\
**Last updated:** [October 16, 2018, 11:21pm UTC](https://forums.unrealengine.com/t/how-to-simply-play-a-sound/369347 "2018-10-16T23:21:25Z")

</div>

I seached around and found only strange solutions; Whats the simplest way to play a Sound with c++? I already found the function UGameplayStatics::PlaySound :slight\_smile:

---

## [Have multiple UObject (Static Mesh & Anim) available](https://forums.unrealengine.com/t/have-multiple-uobject-static-mesh-anim-available/424523)

<div class="topic-metadata">

**Author:** [@Lunarix\_1](https://forums.unrealengine.com/u/Lunarix_1)\
**Replies:** 2\
**Last updated:** [May 7, 2018, 12:38pm UTC](https://forums.unrealengine.com/t/have-multiple-uobject-static-mesh-anim-available/424523 "2018-05-07T12:38:55Z")

</div>

Hi :slight\_smile: I have a class which created in c++ a car (it’s nearly the simple c++ class from the tutorial) This sets up it’s mesh and anim in the constructor: static ConstructorHelpers::FObjectFinder\<USkelet…

---

## [Access Violation with Render Target Asset when using FObjectFinder](https://forums.unrealengine.com/t/access-violation-with-render-target-asset-when-using-fobjectfinder/410769)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_89fb8479](https://forums.unrealengine.com/u/anonymous_user_89fb8479)\
**Replies:** 0\
**Last updated:** [November 28, 2017, 5:49am UTC](https://forums.unrealengine.com/t/access-violation-with-render-target-asset-when-using-fobjectfinder/410769 "2017-11-28T05:49:34Z")

</div>

I’m having trouble trying to load and access a Render Target asset from the content browser in my C++ class. Loading the asset seems to work fine using ConstructorHelpers::FObjectFinder in the constructor of the class, b…

---

## [Loading UDestructibleMesh asset from filesystem](https://forums.unrealengine.com/t/loading-udestructiblemesh-asset-from-filesystem/382401)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_631763f2](https://forums.unrealengine.com/u/anonymous_user_631763f2)\
**Replies:** 4\
**Last updated:** [June 27, 2017, 1:23pm UTC](https://forums.unrealengine.com/t/loading-udestructiblemesh-asset-from-filesystem/382401 "2017-06-27T13:23:16Z")

</div>

Using the tutorial: Components and Collision as a guide, to dynamically load a SphereShape the following is done: AClass::AClass() { // Create USphereComponent USphereComponent \*sphere = NULL; sphere = Creat…

---

## ["Fatal error: \[File:D:\\BuildFarm\\............](https://forums.unrealengine.com/t/fatal-error-file-d-buildfarm/346253)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Replies:** 14\
**Last updated:** [May 28, 2017, 3:19am UTC](https://forums.unrealengine.com/t/fatal-error-file-d-buildfarm/346253 "2017-05-28T03:19:12Z")

</div>

Hi All Anyone seen this error, and may know a solution. Happens every I load the game in the editor. "Fatal error: \[File:D:\\BuildFarm\\buildmachine\_++depot+UE4-Releases+4.10\\Engine\\Source\\Runtime\\CoreUObject\\Private\\UO…

---

## [Project Loading Hangs with FObjectFinder](https://forums.unrealengine.com/t/project-loading-hangs-with-fobjectfinder/363962)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_e6a6ed35](https://forums.unrealengine.com/u/anonymous_user_e6a6ed35)\
**Replies:** 1\
**Last updated:** [July 21, 2016, 8:46pm UTC](https://forums.unrealengine.com/t/project-loading-hangs-with-fobjectfinder/363962 "2016-07-21T20:46:02Z")

</div>

Apologies if this has been asked before, but most of the questions I found about FObjectFinder were using it outside a class constructor. I have a C++ class with a Blueprint class asset extended from it. I call FObject…

---

## [Project Loading Hangs with FObjectFinder](https://forums.unrealengine.com/t/project-loading-hangs-with-fobjectfinder/364214)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_e6a6ed35](https://forums.unrealengine.com/u/anonymous_user_e6a6ed35)\
**Replies:** 2\
**Last updated:** [July 21, 2016, 8:42pm UTC](https://forums.unrealengine.com/t/project-loading-hangs-with-fobjectfinder/364214 "2016-07-21T20:42:51Z")

</div>

Apologies if this has been asked before, but most of the questions I found about FObjectFinder were using it outside a class constructor. I have a C++ class with a Blueprint class asset extended from it. I call FObjectF…

---

## [FObjectFinder a Blueprint Actor Component in C++](https://forums.unrealengine.com/t/fobjectfinder-a-blueprint-actor-component-in-c/336057)

<div class="topic-metadata">

**Author:** [@MADMarkQc](https://forums.unrealengine.com/u/MADMarkQc)\
**Replies:** 4\
**Last updated:** [October 26, 2015, 5:48pm UTC](https://forums.unrealengine.com/t/fobjectfinder-a-blueprint-actor-component-in-c/336057 "2015-10-26T17:48:20Z")

</div>

Hello everyone, I’m having trouble finding the correct syntax to find an Actor Component. This Actor Component is a Blueprint “BP\_HeroAC” that is a child of the C++ Class “HeroAC” . PlayerController.h UHeroAC\* HeroAc…

---

## [How to add an ActorComponent created in blueprints to an Actor created in c++?](https://forums.unrealengine.com/t/how-to-add-an-actorcomponent-created-in-blueprints-to-an-actor-created-in-c/325256)

<div class="topic-metadata">

**Author:** [@Ghar](https://forums.unrealengine.com/u/Ghar)\
**Replies:** 2\
**Last updated:** [July 15, 2015, 2:50pm UTC](https://forums.unrealengine.com/t/how-to-add-an-actorcomponent-created-in-blueprints-to-an-actor-created-in-c/325256 "2015-07-15T14:50:30Z")

</div>

I have a custom ActorComponent created with blueprints. Now I am creating a new Character in code, but I haven’t been able to find an example on how to add the component to the Character. This is what I have so far: h: …

---

## [Error: CDO Constructor: Failed to find Material](https://forums.unrealengine.com/t/error-cdo-constructor-failed-to-find-material/305901)

<div class="topic-metadata">

**Author:** [@Ghar](https://forums.unrealengine.com/u/Ghar)\
**Replies:** 1\
**Last updated:** [February 27, 2015, 9:10pm UTC](https://forums.unrealengine.com/t/error-cdo-constructor-failed-to-find-material/305901 "2015-02-27T21:10:56Z")

</div>

Hello, I’m trying to load a material instance from a blueprint: static ConstructorHelpers::FObjectFinder\<UMaterial\> MIArea(TEXT("MaterialInstanceConstant'/Game/Materials/Decals/MI\_area.MI\_area'")); if (MIArea.Object != …

---

## [ConstructorHelpers::FObjectFinder crash on StandAlone and Mobile Preview only](https://forums.unrealengine.com/t/constructorhelpers-fobjectfinder-crash-on-standalone-and-mobile-preview-only/301162)

<div class="topic-metadata">

**Author:** [@rvc](https://forums.unrealengine.com/u/rvc)\
**Replies:** 1\
**Last updated:** [December 10, 2014, 9:59am UTC](https://forums.unrealengine.com/t/constructorhelpers-fobjectfinder-crash-on-standalone-and-mobile-preview-only/301162 "2014-12-10T09:59:25Z")

</div>

Updated project to 4.6, and now this code crashes on StandAlone and MobilePreview, still works in-editor though: ConstructorHelpers::FObjectFinder\<UClass\> TorchBP(TEXT("/Game/Projectiles/BP\_P\_Torch.BP\_P\_Torch\_C")); Proj…

---

## [Can't i use more than one FObjectFinder(UBlueprint) in the same project?](https://forums.unrealengine.com/t/cant-i-use-more-than-one-fobjectfinder-ublueprint-in-the-same-project/296844)

<div class="topic-metadata">

**Author:** [@uced](https://forums.unrealengine.com/u/uced)\
**Replies:** 5\
**Last updated:** [October 22, 2014, 7:06pm UTC](https://forums.unrealengine.com/t/cant-i-use-more-than-one-fobjectfinder-ublueprint-in-the-same-project/296844 "2014-10-22T19:06:14Z")

</div>

Hi, Not sure if it’s me not understanding something or a bug. In my gamemode.cpp i declare the following: static ConstructorHelpers::FObjectFinder\<UBlueprint\> PlayerControllerObjet(TEXT("Blueprint'/Game/player/BP\_YagP…

---

## [FObjectFinder fails only in packaged game](https://forums.unrealengine.com/t/fobjectfinder-fails-only-in-packaged-game/281027)

<div class="topic-metadata">

**Author:** [@DanH](https://forums.unrealengine.com/u/DanH)\
**Replies:** 1\
**Last updated:** [September 27, 2014, 11:46am UTC](https://forums.unrealengine.com/t/fobjectfinder-fails-only-in-packaged-game/281027 "2014-09-27T11:46:03Z")

</div>

We’re able to successfully package our game for Windows with no errors, but the actual executable throws a null reference exception when loading the game mode’s DefaultPlayerPawn via FObjectFinder: static ConstructorHel…

---

## [Null Reference for Blueprint Camera](https://forums.unrealengine.com/t/null-reference-for-blueprint-camera/292328)

<div class="topic-metadata">

**Author:** [@ErayT](https://forums.unrealengine.com/u/ErayT)\
**Replies:** 0\
**Last updated:** [August 29, 2014, 10:52am UTC](https://forums.unrealengine.com/t/null-reference-for-blueprint-camera/292328 "2014-08-29T10:52:14Z")

</div>

Guys, It is a straightforward question. I have the code below. I try to get an instance of CameraActor but it returns null. Why? static ConstructorHelpers::FObjectFinder\<ACameraActor\> Camera(TEXT("Blueprint'/Game/Blue…

---

## [String Formatting for TEXT](https://forums.unrealengine.com/t/string-formatting-for-text/290626)

<div class="topic-metadata">

**Author:** [@ErayT](https://forums.unrealengine.com/u/ErayT)\
**Replies:** 3\
**Last updated:** [August 10, 2014, 9:51pm UTC](https://forums.unrealengine.com/t/string-formatting-for-text/290626 "2014-08-10T21:51:43Z")

</div>

What I want to do is easy but I cannot figure it out. static ConstructorHelpers::FObjectFinder\<UStaticMesh\> GroundShape(TEXT("StaticMesh'/Game/Shapes/Ground/ground\_shape\_1.ground\_shape\_1'")); The code above is the thin…
