Good afternoon.
An unusual request, if you have free time, please help.
As it is, I am very pleased with your program, it is great!
There is a character, he has clothes on, I want to make its destruction in stages, through torn holes.
But in order not to make a lot of states for all the clothes, I want to use the unreal material tools.
In the widget in the spine properties, there is a choice of additiveblend material, I copied it and made my own, added a noise generator to it and use it as a mask for torn clothes.
Everything works fine, I change the parameters and control everything, but I can't change the parameters from the game.
To do this, create a create material instance dynamic and apply it to spine.
You only have the get additive blend material function, but set does not.
I tried to write something in C++ via the gpt chat, but it seems the logic is more complicated and requires reinitialization of the material.
In SpineWidget.cpp
UPROPERTY(Category = Spine, EditAnywhere, BlueprintReadOnly)
UMaterialInterface *AdditiveBlendMaterial;
In SpineWidget.h
static ConstructorHelpers::FObjectFinder<UMaterialInterface> AdditiveMaterialRef(TEXT("/SpinePlugin/UI_SpineUnlitAdditiveMaterial"));
AdditiveBlendMaterial = AdditiveMaterialRef.Object;
I tried changing BlueprintReadOnly to BlueprintReadWrite, and created a material replacement function in C++, but there is no result.
I'd appreciate it if you could find the time to help.