How to set a texture parameter in C++?
I'm working on a custom USceneComponent. In the constructor I'm trying to load a material asset, a texture asset and apply the material to an attached static mesh component.
This is what I have so far:
This compiles fine, but crashes the Editor on launch, except if I comment the SetTextureParameterValue call. Without it I can start the Editor, see my component, just with the wrong default texture.
I tried doing the same in the Level BP's Event Play and it worked fine. So my material and texture should be ok.
Am I doing something wrong? Thanks!
asked Feb 01 '15 at 03:53 PM in C++ Programming
Here is what turned out to work for me.
In my component constructor I load the assets and assign them to my properties:
Then in my component's PostLoad I apply them:
Thanks Duncan and Rajko for the suggestions!
answered Feb 02 '15 at 01:08 PM
For me the finder only works inside a AHUD derived class :/
answered Mar 24 '15 at 01:12 PM
Ciprian At Facerig
Follow this question
Once you sign in you will be able to subscribe for any updates here