Simply put, I am trying to recreate the "button's" functionality called ("On Click ()");
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