Possible to bind delegates without casting?

It is possible to bind delegates to static members of a struct or a class (not relative to a specific object). Here i set up a test delegate to randomly change a color of a material.

First we setup our struct

283356-3.png

as we declared a static member in a header file, we need to define it in a CPP file to avoid duplicated symbols, so put this line in any CPP file once

283357-4.png

Then we can broadcast and bind functions to the delegate like you said.

283358-5.png

283359-6.png

Hope that helps!

2 Likes