I don’t believe there is any way to explicitly create a struct like that (someone correct me if i’m wrong) … and i’m running on little sleep right now, i know there’s some words i’m not thinking of here to describe that type of creation… just can’t think of it.
this is more of a C++ question than anything specific to Unreal, and I think that this is just probably not a good way to design function parameters in C++…
also you should probably pass in FindByItem by reference, so that you’re not making copies of structs every time you call that function. And typical Unreal convention is that if you’re making a function that can succeed or fail, you’ll have the function type return bool, and use by reference parameters for the results.
I don’t know what your exact task here is, but my guess is that you’re wanting either the int or the FItem as an input, and if you were to define both of them with a default parameter, then the user could pass in no int or FItem, and what would it do then?
If I’m correct, I’d go with overloaded functions, one with the int param and one with the FItem param, and no defaults.