Advertisement
Guest User

Untitled

a guest
Jun 1st, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public override void OnStart(StartState state)
  2. {
  3. base.OnStart(state);
  4.  
  5. if (state == StartState.None) return;
  6.  
  7. StartCoroutine(FireFirstChanged());
  8.  
  9. }
  10.  
  11. public IEnumerator<YieldInstruction> FireFirstChanged()
  12. {
  13. while(!part.started) {
  14. yield return new WaitForFixedUpdate();
  15. }
  16. changed = true;
  17. yield return new WaitForSeconds(1);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement