I have a UTexture2D Object.When I Set the texture on the material, I find it does not show my texture.
The material is blank, but the texture param has data.
Was my answer at the other post you linked able to help you out with this? If not, do you have any questions in particular that I may be able to help out with? From the screenshot it seems like it is being set to me, as neither of those look blank, unless you’re talking about the Physical Material?
Then I create two actot.
ADataSourceActor::ADataSourceActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
Where/when are you calling the ChangeMaterial function? This could be related to why this isn’t working. Please show the code for the function where it’s being called.
Are these two actors of the same class or is it a different class? It seems that you’re hardcoding the texture asset that you’re assigning. Are you sure that the path that you’re providing for the second actor’s texture is correct?
Two objects are created by the same class.
There is no problem of the determination of the image path disk.
Is not the same as the pictures of the reason is, I have to turn the code and let it loads the different files