2D Toolkit Forum

2D Toolkit => Support => Topic started by: flashfoxter on February 20, 2012, 09:10:04 pm

Title: Cant get frame.eventInfo
Post by: flashfoxter on February 20, 2012, 09:10:04 pm
public void userDeath() {
      
      Debug.Log("AlienUser Is Dead");
      
      lifeStatus = false;
      this.collider.enabled = false;
      unitAnim.Play("Die");
      unitAnim.animationEventDelegate = this.animationCompleteTank;
      
   }
   
   
   void animationCompleteTank(tk2dAnimatedSprite sprite, tk2dSpriteAnimationClip clip, tk2dSpriteAnimationFrame frame, int frameNum) {
      
         Debug.Log("On Bug Animation Complete");
         string str = sprite.name + "\n" + clip.name + "\n" + "INFO: " + frame.eventInfo;
         Debug.Log("INFO: "+ str);
      
         Destroy(this.gameObject);
}


Cant get frame.eventInfo its null !!! HELP !
Title: Re: Cant get frame.eventInfo
Post by: unikronsoftware on February 20, 2012, 10:02:31 pm
Did you set eventInfo on that particular frame in the interface? If you did, can you make sure the data has persisted across executions.
Title: Re: Cant get frame.eventInfo
Post by: flashfoxter on February 20, 2012, 10:22:10 pm
Did you set eventInfo on that particular frame in the interface? - Yes
If you did, can you make sure the data has persisted across executions - Don't understand. (My english is not so good)
Title: Re: Cant get frame.eventInfo
Post by: unikronsoftware on February 20, 2012, 10:57:09 pm
Can you close Unity down, and after restarting, can you check that the data is still present? The frame data passed through is exactly the same as the one which stores the trigger bool, so if one of them works, I would expect the other to work fine.

If the data is still correct, do you think you could set up a test case for me? If possible, please mail to support at unikronsoftware dot com
Title: Re: Cant get frame.eventInfo
Post by: 39thstreet on June 11, 2012, 09:39:12 pm

Was there every a resolution to this?  Since it was so long ago, I'm assuming there was some mistake being made.  But I'm having the same issue with the latest beta, and I don't see why I'm not getting eventInfo.
Title: Re: Cant get frame.eventInfo
Post by: unikronsoftware on June 11, 2012, 10:59:24 pm
Strangely I am unable to reproduce this. I initially thought it the value mightn't have been serializing properly, but it doesn't look like this is the case in the tests I've been doing.

Is there anything special about your animations? Just to check again -
1. Is the data present in the inspector after you shut down Unity and restart?
2. How do you spawn your animated sprites?
3. If you store any int / float values in there, do those come through properly?

With any luck, we could identify it, get it fixed and in 1.75 final.
Title: Re: Cant get frame.eventInfo
Post by: 39thstreet on June 12, 2012, 04:48:12 pm
False alarm, this was a pure code error on my end.   :-\