TargetParameterCount Exception
Issue #1
new
Error -> TargetParameterCountException: parameters do not match signature
Code
int key_i = 0;
XMLSerializer ss = new XMLSerializer ();
List<Atlas> keys = new List<Atlas> ( this.libAnimations.Keys );
List<List<Anim>> anims = new List<List<Anim>> ( this.libAnimations.Values );
foreach ( Atlas key in keys )
{
string output = ss.Serialize ( anims[ key_i++ ] );
Main.Log ( PATHSERI + FILEANIMS + key.atlasName + FILEEXT + ": \b" + output );
}
Anim
[Serializable]
public class Anim
{
public const float DEF_SPEED = 6f;
public bool active;
public string name;
public float fps;
public bool loop;
public string animationToJump;
public bool[] actives;
[NonSerialized]
public Sprite[] frames;
public Anim ()...
public float duration...
public int numFrames...
public bool hasAnimationToJump...
public float secsPerFrame...
}
Comments (2)
-
-
repo owner Hey,
Its been awhile since I looked at the code, I will have to go over it tonight when I have more time. Though if i had to guess it is the use of the generics which is throwing it for a loop. If i remember correctly list<Something> is supported, but list<list<somthing>> is not. Im thinking you could work around it by doing something like.
public class animationList:List<Anim>{} public class listOfAnimationLists:List<animationList>{}
and serializing the data that way. But again wildly guessing since i haven't looked at the code in awhile. Will get back to you with a better answer tonight.
- Log in to comment
Could be related to: https://stackoverflow.com/questions/31835823/parameter-count-mismatch-in-property-getvalue