# Getting UTexture\*, but not in constructor

**URL:** <https://forums.unrealengine.com/t/getting-utexture-but-not-in-constructor/428755>\
**Category:** Rendering\
**Tags:** constructors, unreal-engine, question, pointers\
**Created:** [July 5, 2018, 11:42am UTC](https://forums.unrealengine.com/t/getting-utexture-but-not-in-constructor/428755 "2018-07-05T11:42:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WarpSpider833](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WarpSpider833](https://forums.unrealengine.com/u/WarpSpider833)\
**Post date:** [July 5, 2018, 11:42am UTC](https://forums.unrealengine.com/t/getting-utexture-but-not-in-constructor/428755/1 "2018-07-05T11:42:46Z")

</div>

I need to find a UTexture pointer, but I’ve just realize that I can’t do it in the constructor. Until now I’ve been using:

```
FString Path = TEXT("/Path/..");

static ConstructorHelpers::FObjectFinder<UTexture> TexReference(*(TexPath));

UTexture * Texture = TexReference.Object();

```

Trouble is, I’ve just discovered the hard way that ConstructorHelpers::FObjectFinder only works in the constructor (not surprising really, considering it’s name!). Is there a way to do this elsewhere? I think it’s possible with LoadClass, but I can’t get it to work.

Thanks

---

<div class="post-metadata">

**Author:** ![Katianie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Katianie](https://forums.unrealengine.com/u/Katianie)\
**Post date:** [July 5, 2018, 2:21pm UTC](https://forums.unrealengine.com/t/getting-utexture-but-not-in-constructor/428755/2 "2018-07-05T14:21:33Z")

</div>

This might be what you are looking for: [https://answers.unrealengine.com/questions/368239/change-characters-material-at-runtime-using-c.html](https://answers.unrealengine.com/questions/368239/change-characters-material-at-runtime-using-c.html)

Its about finding and loading a specific material during runtime (after the constructor is called, during BeginPlay).

---

<div class="post-metadata">

**Author:** ![WarpSpider833](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WarpSpider833](https://forums.unrealengine.com/u/WarpSpider833)\
**Post date:** [July 5, 2018, 4:38pm UTC](https://forums.unrealengine.com/t/getting-utexture-but-not-in-constructor/428755/3 "2018-07-05T16:38:13Z")

</div>

You can do this with LoadObject:

UTexture \* Texture = LoadObject(nullptr, \*TexPath);

Not sure how this affects performance, but it works for me!
