Making button function wait for function before it to finish / Using WaitForSeconds.
I am making a card game and i want there to be a delay (0.5f) before each card spawns. On a click of a button I have 4 different functions which spawn 4 cards. If I use an IEnumerator but it doesnt seem to work .I have my whole void to instansiate a card in the IEnumerator and i have yield return new WaitForSeconds(0.5f)I call my IEnumerator in inherited class by.StartCoroutine(MakeCard(......));
Unity2D C#
Thanks for any support.
The function is the same just called 4 times with different parameters. And i have to call them separated because 2 of the cards are called from a different class.
Post some relevant code for better chances of getting help
Your answer
Follow this Question
Related Questions
How can I delay 1 second this code? 3 Answers
Delay in setting Boolean Value 1 Answer
Slight delay adding 0 Answers
Wait time Before Camera Switching? 0 Answers