Closed z7oka closed 2 years ago
I got the same error when trying to launch sample plugin. Try this instead of using DeepClone:
internal List<Entity> Entities => CoreAPI.Game.Entities.Values.Select(x => x.Clone()).ToList();
Thanks @iceberk for the workaround/correct usage. I'll close it for now and reopen when I test it locally if I still get the same error.
I am coding a simple plugin here's the important snippet
I am counting the number of minion in the GRAVEYARD on every turn start, after some debugging I found out that any mention of Entities is throwing a Serialization exception. Visual Studio complained EntityInfo is not Serializable. After adding the tag, it worked.
Am I developing the plugin correctly? is this the right way to access CoreAPI.Game.Entities ?