I know this has been discussed in a separate question, however i have tried everything i can think of. Its very simple code, but if i have yield in the function none of the code works at all. Heres what i have
def Splash(point as Vector3)as IEnumerator:
splash=Instantiate(splashSystem,point,Quaternion.identity)
while splash.isPlaying:
yield
//Destroy(splash.gameObject)
I have another function that uses yield as well, that doesnt work either…i ended up using WaitForEndOfFrame inside that function, that obviously wont work in the shown case however. Any ideas how to get yield working? I have import System.Collections at the top of the script.