Home > front end >  Set functions as variables to call, Unity
Set functions as variables to call, Unity

Time:10-24

Simply put, I am trying to recreate the "button's" functionality called ("On Click ()"); enter image description here

So that I will be able to put an object, select the one of the scripts from it, and call a function from it. The logic whenever to call it will be handled in the script itself, something likeif(callFunctions) { for(int i = 0; i < functionArray.length(); i ){ functionArray[i].call();}} I did try to review the button's script but couldn't recreate this functionality.

CodePudding user response:

That can be done using UnityEvents. Take a look at this video

https://www.youtube.com/watch?v=TWxXD-UpvSg

  • Related