Search Unity

PSM StartCoroutine exception

Discussion in 'PSM' started by Stranger-Games, Sep 17, 2014.

  1. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Hello,

    I am trying to make my PC game run on my PS Vita.
    Most things are going on just as expected on PC, but I get this strange exception when calling the following coroutine.

    Code (CSharp):
    1.  
    2. IEnumerator ShowMessages() {
    3.         guiMessageController.ShowMessage (MessageStr.FollowMarkerForObjectives, 2.5f); //Never called
    4.  
    5.         yield return new WaitForSeconds(2.5f);
    6. .....
    7.  
    I have also attached the exception from the log.
    The game does not crash but the Coroutine first line is never seem to be called.

    I am using Coroutines extensively in other places and they all worked very well, so I am wondering whey this one did not work.

    Any help is greatly appreciated.
     

    Attached Files:

    • log.jpg
      log.jpg
      File size:
      193.8 KB
      Views:
      912
  2. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    I solved it by changing from this code snippet to the one after that.
    Code (CSharp):
    1. IEnumerator ShowMessages() {
    2.         ...
    3.         base.StartState ();
    4.         ...
    5.     }
    Solved by this

    Code (CSharp):
    1. IEnumerator ShowMessages() {
    2.         ...
    3.        
    4. CallBaseStartState ();
    5. ...
    6.     }
    7.  
    8.     void CallBaseStartState() {
    9.         base.StartState ();
    10.     }
    11.