Facepunch / sbox-issues

173 stars 11 forks source link

[Shadergraph] More explicit error for missing a vector input on Apply TRS node #5896

Closed QuackCola closed 1 month ago

QuackCola commented 1 month ago

What it is?

if you simple add the Apply TRS node to a graph without connecting anything to any of its inputs. you will get the compiler error below. Screenshot 2024-07-23 091228

Shadergraph should have a more explicit error for missing the vector input rather than just the above.

What should it be?

Solution

add the following before var vector = compiler.Result( Vector ); from within the ApplyTrs class

if ( !Vector.IsValid() )
{
    return NodeResult.Error( "Missing Vector Input!" );
}

Result

Screenshot 2024-07-23 092012

Metapyziks commented 1 month ago

Thanks!