- Editado
We're happy to announce that our spine-godot runtime now supports programming using the C# language! Learn more in our blog post.
Edit: Also be sure not to miss our second blog post about Setting up spine-godot with C#.
We're happy to announce that our spine-godot runtime now supports programming using the C# language! Learn more in our blog post.
Edit: Also be sure not to miss our second blog post about Setting up spine-godot with C#.
Nice! I'm giving this a whirl soon
hello ,https://esotericsoftware.com/spine-godot#C%23-Project-Setup
i cant find
GodotSharpEditor.4.1.0.snupkg
Godot.NET.Sdk.4.1.0.nupkg
Godot.SourceGenerators.4.1.0.nupkg
GodotSharp.4.1.0.nupkg
GodotSharp.4.1.0.snupkg
GodotSharpEditor.4.1.0.nupkg
files in zip file
I am on a Windows PC and can't find it either. Anytime I download the folder with C# sharp support, the folder labeled "GodotSharp" is empty. I even tried using Git Bash. Please see my screenshots below.
To even get the program to run, I had to take files from a version I downloaded from Godot's website.
This shows the error I got when using Git Bash to install a version of Godot with C# support from the runtimes folder.
The program runs fine, and I can set up some Spine stuff. However, I can't code anything in C# as I get an assembly missing reference. I've triple-checked with the webpage on using C# with Spine and Godot and I don't think I've missed any steps.
i found those files in zip file from the godot site: https://godotengine.org/download/windows/
download the godot engine with c# support.
and you will find it in zip "GodotSharp/Tools/nupkgs"
i also have errors of assembly missing reference and all the methods of the spine, i followed all the steps and still can't get it working.
Demonz312 Yes, I was able to get them from there too. I think the missing reference is from the missing files from Spine's side (I could be wrong). This is because their documentation states:
"Copy the Godot C# assemblies from the downloaded Godot editor ZIP file to that folder. These are the files you need to copy:
GodotSharpEditor.4.1.0.snupkg
Godot.NET.Sdk.4.1.0.nupkg
Godot.SourceGenerators.4.1.0.nupkg
GodotSharp.4.1.0.nupkg
GodotSharp.4.1.0.snupkg
GodotSharpEditor.4.1.0.nupkg"
I am assuming they mean from the file downloaded from this site. Also, they state:
"This configures the godot-nuget directory to be a package source for NuGet packages. Instead of fetching the official Godot C# assemblies from the NuGet package registry, the assemblies from the godot-nuget directory will be used, which also include the C# bindings for the spine-godot runtime."
I am by no means an expert, so I am hoping to find clarification/help here.
i think so the same, but lets wait for the response from them, because i can't find any solution for this to work.
Misaki Windows 11 x64,like @IceSparkStudios say,guess miss this files or document need update
Sorry for the trouble. Please follow the issue here:
EsotericSoftware/spine-runtimes2365
Something in the build process of Godot appears to have changed, which leaves this folder empty. I'm investigating.
We have published a new blog post which briefly explains the steps to get started using C# with spine-godot and how it differs from using GDScript: Blog: Setting up spine-godot with C#
I hope this will be helpful to those who are about to start using spine-godot with C# support.
Just came in to say that I've been having some problems too. While that is a great blog post with much better details and pictures than the original, I'm still having issues.
I actually downloaded a new version of Godot directly from the Spine download page and a new copy of the spine-runtimes example projects from GitHub. However, I still received many CS0246 "The type or namespace name 'SpineBoneNode' could not be found (are you missing a using directive or an assembly reference?)" errors.
I can't seem to upload the full msbuild log, but I do see that it mentions using the correct NuGet file:
RestoreTask: NuGet Config files used:
RestoreTask: E:\Projects\Godot\spineexperimentation\spine-runtimes-4.1\spine-godot\example-v4-csharp\NuGet.Config
RestoreTask: C:\Users\rlind\AppData\Roaming\NuGet\NuGet.Config
RestoreTask:
RestoreTask: Feeds used:
RestoreTask: E:\Projects\Godot\spineexperimentation\spine-runtimes-4.1\spine-godot\example-v4-csharp\godot-nuget
RestoreTask: https://api.nuget.org/v3/index.json
RestoreTask: All projects are up-to-date for restore.
Done building project "spine-godot-examples.csproj".
Before failing:
"E:\Projects\Godot\spineexperimentation\spine-runtimes-4.1\spine-godot\example-v4-csharp\.godot\mono\temp\obj\Debug\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs" E:\Projects\Godot\spineexperimentation\spine-runtimes-4.1\spine-godot\example-v4-csharp\.godot\mono\temp\obj\Debug\spine-godot-examples.AssemblyInfo.cs /warnaserror+:NU1605
E:\Projects\Godot\spineexperimentation\spine-runtimes-4.1\spine-godot\example-v4-csharp\examples\01-helloworld\Spineboy.cs(4,33): error CS0246: The type or namespace name 'SpineSprite' could not be found (are you missing a using directive or an assembly reference?) [E:\Projects\Godot\spineexperimentation\spine-runtimes-4.1\spine-godot\example-v4-csharp\spine-godot-examples.csproj]
I would like to note that GDScript seems to work alright, but I really don't want to have to mix the two.
Trying this on macOS, and I get this for each atlas png:
No loader found for resource: res://Spine/BP_Front_Area3_Pod.png.
/Users/runner/work/spine-runtimes/spine-runtimes/spine-godot/spine_godot/SpineAtlasResource.cpp:74 - Can't load texture: "res://Spine/BP_Front_Area3_Pod.png"
I can view the pngs in Godot and natively. Any clues? I presume this is why my .skel files aren't open-able.
oaf This is not C# or macOS specific. See this thread: https://esotericsoftware.com/forum/d/24839-cant-import-skeletons/10
@WarriorServent sorry I was out with stupid Corona.
Are you using an IDE like JetBrains Rider? I can simply not reproduce the error you get with our example on Windows or macOS, both with and without using Rider.
The error stems from the fact, that the build process does not pull in our assemblies, but the official Godot assemblies. Could you maybe try deleting the .nuget directory in your user's home directory? NuGet is very bad at managing the contents in there. My guess is that it simply doesn't copy over our assemblies from spine-godot/example-v4-csharp/godot-nuget to the corresponding .nuget directory, which likely contains the official Godot assemblies.
Mario jeez, I hope you're feeling better!
As for the IDE, I have been using Visual Studio Code for a number of things, but I also attempted to use only the built in Godot editor. Both times I got build errors in Godot.
I just tried deleting everything in the .nuget directories in my home directory again and it seems to have worked this time. Last time I think that I only deleted from either the godotsharp or the godotsharpeditor, but this time I deleted from both and it seems to have worked for the example project and my own personal projects, even when using Visual Studio Code. Will have to do additional experiments to check for full functionality.
Thanks!!
I'm glad we have a temporary solution. I don't understand how NuGet can simply ignore the local feed and pretend the assemblies in its cache are the same. I'm afraid I do not know how we could possibly solve this on our end.
I've setup a clean Windows VM, installed the latest .NET Core 7, and downloaded and extracted our spine-godot 4.1.2 editor binary from our site.
I opened the example-v4-csharp project and ran the default scene from within the editor. This time the build failed! Here's the log:
X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
Restoring packages for C:\Users\badlogic\AppData\Local\Temp\NuGetScratch\0534363c47e541c296d2053538f4fc46\30707e35a13d4f0693c702dd86f0e2f1.proj...
GET https://api.nuget.org/v3-flatcontainer/godot.net.sdk/index.json
OK https://api.nuget.org/v3-flatcontainer/godot.net.sdk/index.json 146ms
GET https://api.nuget.org/v3-flatcontainer/godot.net.sdk/4.1.2/godot.net.sdk.4.1.2.nupkg
OK https://api.nuget.org/v3-flatcontainer/godot.net.sdk/4.1.2/godot.net.sdk.4.1.2.nupkg 57ms
Installed Godot.NET.Sdk 4.1.2 from https://api.nuget.org/v3/index.json with content hash 0DCxIk3bqjq5qAClZYbGETMS5e63YgUer/be+TiVYJQBwZ9Bc3yvUrsNuY1UybwSudJzUT/az3y5LfmVyKdVzQ==.
Project "spine-godot-examples.csproj" (Restore target(s)):
Project "spine-godot-examples.csproj" (_IsProjectRestoreSupported target(s)):
Done building project "spine-godot-examples.csproj".
NuGetMessageTask: Determining projects to restore...
Project "spine-godot-examples.csproj" (_GenerateRestoreProjectPathWalk target(s)):
Done building project "spine-godot-examples.csproj".
Project "spine-godot-examples.csproj" (_IsProjectRestoreSupported target(s)):
Done building project "spine-godot-examples.csproj".
Project "spine-godot-examples.csproj" (_GenerateRestoreGraphProjectEntry target(s)):
Done building project "spine-godot-examples.csproj".
Project "spine-godot-examples.csproj" (_GenerateProjectRestoreGraph target(s)):
Done building project "spine-godot-examples.csproj".
RestoreTask: X.509 certificate chain validation will use the default trust store selected by .NET for code signing.
RestoreTask: X.509 certificate chain validation will use the default trust store selected by .NET for timestamping.
RestoreTask: Restoring packages for D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\spine-godot-examples.csproj...
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/godot.sourcegenerators/index.json
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/godotsharp/index.json
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/godotsharpeditor/index.json
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/godot.sourcegenerators/index.json 272ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/godotsharpeditor/index.json 277ms
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/godot.sourcegenerators/4.1.2/godot.sourcegenerators.4.1.2.nupkg
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/godotsharpeditor/4.1.2/godotsharpeditor.4.1.2.nupkg
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/godotsharp/index.json 317ms
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/godotsharp/4.1.2/godotsharp.4.1.2.nupkg
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/godot.sourcegenerators/4.1.2/godot.sourcegenerators.4.1.2.nupkg 40ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/godotsharpeditor/4.1.2/godotsharpeditor.4.1.2.nupkg 53ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/godotsharp/4.1.2/godotsharp.4.1.2.nupkg 46ms
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.ref/index.json
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/microsoft.windowsdesktop.app.ref/index.json
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.ref/index.json
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.ref/index.json 149ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.ref/index.json 147ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/microsoft.windowsdesktop.app.ref/index.json 195ms
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.ref/6.0.23/microsoft.aspnetcore.app.ref.6.0.23.nupkg
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/microsoft.windowsdesktop.app.ref/6.0.23/microsoft.windowsdesktop.app.ref.6.0.23.nupkg
RestoreTask: GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.ref/6.0.23/microsoft.netcore.app.ref.6.0.23.nupkg
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.app.ref/6.0.23/microsoft.aspnetcore.app.ref.6.0.23.nupkg 18ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/microsoft.windowsdesktop.app.ref/6.0.23/microsoft.windowsdesktop.app.ref.6.0.23.nupkg 21ms
RestoreTask: OK https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app.ref/6.0.23/microsoft.netcore.app.ref.6.0.23.nupkg 26ms
RestoreTask: Installed Godot.SourceGenerators 4.1.2 from https://api.nuget.org/v3/index.json with content hash WVZ+0PsBSwASQNGmmnv5OEkClwe3M0E0LfzmnRKYNzU7V+qnaW+QU0COTVjzQLBlhIdS9sX2gHAR/ogZdKnhVA==.
RestoreTask: Installed GodotSharpEditor 4.1.2 from https://api.nuget.org/v3/index.json with content hash L8toPAj+YzsHVtR7JEKC11//oBEVoB91kVY49kjCkVuqTLSsg8NKPaYE+54YRyI2g9lqSES9xX5bQ/6yT9rOWA==.
RestoreTask: Installed GodotSharp 4.1.2 from https://api.nuget.org/v3/index.json with content hash iuXYVigWjGVLUIhqGDf5f/kba2ILQKZbE3U6eQrc1582yn5U39j2rDwFPlzfamvxiSu340tHzBnQ3IDi/T/Htw==.
RestoreTask: Installed Microsoft.NETCore.App.Ref 6.0.23 from https://api.nuget.org/v3/index.json with content hash IW4zUHwtWHLjlEKQfeZMnrq5RO916BL1vwm2wslSLNZ9wbVHL1G3LyRLFzJzaPMp9RPzLicU2lWZ75b4rtLzJw==.
RestoreTask: Installed Microsoft.AspNetCore.App.Ref 6.0.23 from https://api.nuget.org/v3/index.json with content hash oOuoJyh6RM5wac9zgV3Ui0PEGsfzQQke7JZqPvMRxIzeBh+IOKFD3yBXGxHg41AcAzhFyCKLn8TvYwoDm94wzg==.
RestoreTask: Installed Microsoft.WindowsDesktop.App.Ref 6.0.23 from https://api.nuget.org/v3/index.json with content hash TeCfQvsp1REZ9vRYw/P5bo5aZmJ1A9uGO6Jap18PwF252S+TqrbphQZksFJ13a+6f2Mwmfsa8sLEvTWKD6fBTQ==.
RestoreTask: Generating MSBuild file D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\.godot\mono\temp\obj\spine-godot-examples.csproj.nuget.g.props.
RestoreTask: Generating MSBuild file D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\.godot\mono\temp\obj\spine-godot-examples.csproj.nuget.g.targets.
RestoreTask: Writing assets file to disk. Path: D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\.godot\mono\temp\obj\project.assets.json
RestoreTask: Restored D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\spine-godot-examples.csproj (in 1,84 sec).
RestoreTask:
RestoreTask: NuGet Config files used:
RestoreTask: D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\NuGet.Config
RestoreTask: C:\Users\badlogic\AppData\Roaming\NuGet\NuGet.Config
RestoreTask:
RestoreTask: Feeds used:
RestoreTask: D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\godot-nuget
RestoreTask: https://api.nuget.org/v3/index.json
RestoreTask:
RestoreTask: Installed:
RestoreTask: 3 package(s) to D:\workspaces\spine-runtimes\spine-godot\example-v4-csharp\spine-godot-examples.csproj
Done building project "spine-godot-examples.csproj".
The restore task responsible for fetching the dependencies from NuGet recognized the nuget.config file from the project directory, but still pulls the official dependencies from the NuGet repository. That's crazy town. It should prioritize the local NuGet feed.
Well, here's the issue:
The NuGet packages commited to our spine-runtimes repo are version 4.1.1, not 4.1.2. On my local dev machines I have the 4.1.2 binaries due to the way I build the example project for development.
So I copied over the files from the files from the downloaded spine-godot Editor .zip (GodotSharp\Tools\nupkgs
) to the example-v4-csharp/godot-nuget
directory, deleted $User/.nuget/packages/Godot*
, and reran the build.
Great success:
This time it pulled in the dependencies from the godot-nuget/
folder as it should.
I've pushed the updated NuGet packages to the spine-runtimes repository. Thanks for reporting!
I am using Visual Studio 2022 (not VS Code) and I have followed the guides, but still VS gives a namespace error. I have shut down Godot, erased and reinstalled files, and still have not found success. Are there any updates on how to do this? Some seem to be getting it to work and I wonder if I am just missing something.