Alexa.Ki
(Alendromeda.ki)
1
How to check these all instances in one line? if this is possible.
if (::IsValid(Material_A && Material_B && Material_C && Material_D))
{
//Logic
}
I am getting an error, no instance of overload function "IsValid" is matched.
any help appreciated.
Alexa.Ki
(Alendromeda.ki)
2
I can do like this, but this is not simple 
if (::IsValid(Material_A))
{
if (::IsValid(Material_B))
{
if (::IsValid(Material_C))
{
if (::IsValid(Material_D))
{
//Logic
}
}
}
}
bool YourClass::AreMaterialsValid(TArray<UMaterial*> Materials) {
for (UMaterial* MaterialX : Materials) {
if (!IsValid(MaterialX)) {
return false;
}
}
return true;
}
2 Likes
Alexa.Ki
(Alendromeda.ki)
4
Thank You for the reply and helping me in my studies, I like the way the for Loop is implemented Thank You very much for the solution.
1 Like
if (IsValid(Material_A) &&
IsValid(Material_B) &&
IsValid(Material_C))
{
// Logic
}
1 Like
Alexa.Ki
(Alendromeda.ki)
6
Thank You for the reply and helping me in my studies.