Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
omard2000

Wait for coroutine to finish in a script that does not inherit from Monobehaviour

Question

Hi everyone,

 

So at the moment I have two scripts, one which does inherit from Monobehaviour and the other that does not inherit from Monobehaviour.

Right now, I am able to start coroutines in the non-monobehaviour script like this:

 

Please login or register to see this code.

My issue now is how can I create a Loader coroutine INSIDE the script that does not inherit from Monobehaviour? I know I can create a loader coroutine inside the script that does inherit from Monobehaviour but it would be very inconvenient as I would have to place the loader throughout a lot of scripts. Does anyone have any ideas on how to solve this?

 

I the script PHP_LoginSystem I need the coroutine RefreshProfile to finish before calling the print function basically.

 

Thanks! :)

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...