For Property tracks, I can drill down to pretty much any component on a game object and choose a property to manage. I’d like to do something similar for an Action track, where instead of choosing a property, I can choose a method to call. Is there a kind of Action that supports this? Or is SendMessage the only option for calling arbitrary messages on a component? If so, the method I want to call takes an Enum parameter that needs to be passed in. Can I call this kind of method using Slate?
Indeed, right now the only option available to call a function from within Slate, is to use the “SendMessage” action clip, although I do plan to add more advanced reflection based clips for that.
The default/existing SendMessage variants can not send a custom enum type as a parameter, but because the base class of SendMessage action clip, is a generic class, you can create a super simple custom action clip, to send the type you want as a parameter like this:
Simply replace “MyEnum” with any type you want and it will work 🙂
Just make sure to keep this custom action clip outside of the Slate folder, to avoid accidentally deleting it when updating Slate in the future.
Let me know if that works for you.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.