|
hh
public:
UFUNCTION(BlueprintCallable)
static bool SkyMeshMatSetFunc(
AActor* Act,
UStaticMeshComponent* UMC,
UPARAM(ref) bool& oncekey,
UMaterialInterface* UMat,
FName OptionName,
UPARAM(ref) float& SunSethight
);
//static FFloatProperty* Sunhig;
//protected:
ss
AActor* Act,
UStaticMeshComponent* UMC,
UPARAM(ref) bool& oncekey,
UMaterialInterface* UMat,
FName OptionName,
UPARAM(ref) float& SunSethight
if (UMC != nullptr)
{
UMC->K2_SetWorldRotation(FRotator(0, 0, 0), false, aa, false);
if (!oncekey)
{
UMID = UMC->CreateDynamicMaterialInstance(0, UMat, NAME_None);
oncekey = true;
}
FVector XVector = Act->GetActorRotation().Vector();
if (UMID != nullptr)
{
UMID->SetVectorParameterValue("Sun Direction", FLinearColor(XVector));
}
}
//Act->GetActorRotation().Pitch
//Sunhig = FindFieldChecked<UFloatProperty>(Act->GetClass(), "Sun Height");
|
|