dimanche 28 septembre 2014

enum bugs in kopilua


Vote count:

0




The enum in C# like this:



public enum QualityColor
{
Silver = 0,
Green = 1,
Blue = 2,
Violet = 3,
Orange = 4
}


and, a C# class : public class QualityItem { public int id { get; set; } public QualityColor quality { get; set; } }


Now , when I use the class in lua like this:


local item = luanet.ConfigManager.Instance:GetItem(id) --The quality of item is Silver UnityEngine.Debug.Log("The quality of item is :"..item.quality)


The output in the console is :


The quality of item is :null :0


Then I tried others , it's ok, only when the quality is Silver,which value is zero , The result is "null :0", others for example Green,the result is "Green :0"


And, the issue ocurred in android platform of unity 4.5. We used KopiLua.


Have anyone can help me ? thanks.



asked 1 min ago







enum bugs in kopilua

Aucun commentaire:

Enregistrer un commentaire