Hi There
Apologies, I’d normally struggle through this on my own, but I remember last time I asked for help here you guys were very helpful, and also I’m somewhat against the clock in that I’d like to demonstrate to my boss that MonoGame / Native solution > HTML5 / Javascript hybrid app. But this means we should be able to use all or most our existing tools, such as Spine
So far I setup a basic project, built for android, all super simple! Next I want to display a spine animation. I followed the rather short setup guide here - https://github.com/EsotericSoftware/spine-runtimes/tree/3.7/spine-monogame
However currently I get the error
CS0246 The type or namespace name ‘IVertexEffect’ could not be found (are you missing a using directive or an assembly reference?
I’m not sure if this is a red herring, but I can’t see a class with this name in the files. I’m certain its something simple and silly I’m doing wrong, I’m a little rusty with vstudio as well, so it may well just be that I miss understood something.
Can anyone point me in the right direction regarding this?
Many thanks,
Ows
If its of any use to anyone, I got past this by simply deleting any references to IVertexEffect (it was used inside a case != null, so I guess its a special feature that has broken, probably something to raise with Esoteric)
Now my next problem, do I import through monogame asset pipeline…
I actually just went through this myself. I’m unsure if you’re still searching for an answer to this, but figured I’d list how I solved the issue in case anyone else comes across this issue.
The IVertexEffect Interface is defined in VertexEffect.cs, which is part of the “spine-xna” project in the Spine runtime libraries. Including this file into your project should get rid of that error.
For the sake of completeness, I should mention that the spine-xna project is pretty out of date and difficult to include in a MonoGame solution. It targets some older frameworks and a lot of assumed XNA references that no longer exist. I ended up making my own project which just includes the source files as it ended up being much less of a headache.
I added spine-csharp and my new spine-xna-wrapper projects to my Visual Studio solution, added references to them in my main game project, and replaced all the XNA references in spine-xna-wrapper to point to my MonoGame.Framework.Windows project.
After that, the only compilation issue I ran into was SkeletonDebugRenderer.cs, which was trying to access internal classes defined in spine-csharp. This was specific to my solution since I put things in different assemblies. However I ended up just removing SkeletonDebugRenderer from my wrapper project instead of fixing this because there were additional compilation errors in the file and it wasn’t something I needed.
Yeah I basically went through all the same steps as you, all except .
For the sake of completeness, I should mention that the spine-xna project is pretty out of date and difficult to include in a MonoGame solution. It targets some older frameworks and a lot of assumed XNA references that no longer exist. I ended up making my own project which just includes the source files as it ended up being much less of a headache
I just followed info from esoteric regarding monogame, can you think of any issues I might run into using the spine-xna wrapper? I’d rather get it out of the way now rather than find it bits me in the backside later on
Aside from the initial project setup I’ve not run into or seen anything that looks problematic. Luckily the MonoGame team did a pretty great job keeping things between MG and XNA extremely similar so once the project is set up to pull in MonoGame references instead of XNA ones everything seems to be mapping 1 to 1.
That said, we just got Spine integrated last year and started messing with it this week, and as of right now our only target is an x64 PC build. So I haven’t really put the code through its paces yet. If I come across potential issues as we work with it I’ll be sure to post it up here.