Hello, I found a way to create a Dynamic Texture for Fog Oа War, for that purpose I can use actor like that:
UCLASS()
class WARGAME_API ARenderFogOfWar : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ARenderFogOfWar();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
//Our dynamically updated texture
UPROPERTY(VisibleAnywhere, BlueprintRead, Category = "Fog of War")
UTexture2D* FOWTexture;
// Material we needs to set dynamic texture
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Fog of War")
UMaterialInstance* MaterialInstance;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
I can create this actor for each player, and unique texture and I can set dynamic texture for material instance, but I am not sure that landscape and material instance for it is unique for each player controller.
Can someone help me find a proper way for my goal?