mrjul / estragonia Goto Github PK
View Code? Open in Web Editor NEWEstragonia: Avalonia in Godot
License: MIT License
Estragonia: Avalonia in Godot
License: MIT License
Followed the setup instructions and compared against the HelloWorld example in my own project, but am getting the following error:
System.TypeLoadException
HResult=0x80131522
Message=Method 'PushRenderOptions' in type 'Avalonia.Skia.DrawingContextImpl' from assembly 'Avalonia.Skia, Version=11.0.0.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b' does not have an implementation.
Source=Avalonia.Skia
StackTrace:
at Avalonia.Skia.SkiaGpuRenderTarget.CreateDrawingContext() in /_/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs:line 37
at Avalonia.Rendering.Composition.Server.ServerCompositionTarget.Render()
Any idea what might cause this issue?
(Using Godot 4.1.1 on Windows 10)
Not sure what i'm missing from the tutorial. I've gone through it several times, but my project won't build.
Error CS8350 This combination of arguments to 'AvaloniaControl.InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)' is disallowed because it may expose variables referenced by parameter 'method' outside of their declaration scope GREM Godot.SourceGenerators\Godot.SourceGenerators.ScriptMethodsGenerator\Grem.Scenes.UserInterface_ScriptMethods.generated.cs 33 Active
Error CS9077 Cannot return a parameter by reference 'method' through a ref parameter; it can only be returned in a return statement GREM Godot.SourceGenerators\Godot.SourceGenerators.ScriptMethodsGenerator\Grem.Scenes.UserInterface_ScriptMethods.generated.cs 33 Active
The auto generated code in question is:
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret) { if (method == MethodName._Ready && args.Count == 0) { _Ready(); ret = default; return true; } if (method == MethodName._Process && args.Count == 1) { _Process(global::Godot.NativeInterop.VariantUtils.ConvertTo<double>(args[0])); ret = default; return true; } **return base.InvokeGodotClassMethod(method, args, out ret);** }
Any idea on where to start fixing this?
The designer appears to be looking for the output of the ExportDebug configuration regardless of what configuration is selected.
When in "Debug" the following appears in the avalonia output window:
08:42:02.229 [Information] 0 Starting previewer process for '"C:\xxx.godot\mono\temp\bin\ExportDebug\GREM.dll"'
08:42:02.233 [Information] 18532 Started previewer process for '"xxx.godot\mono\temp\bin\ExportDebug\GREM.dll"'. Waiting for connection to be initialized.
The helloWorld example has the same issue:
08:56:28.443 [Information] 0 Starting previewer process for '"xxx\Estragonia\samples\HelloWorld.godot\mono\temp\bin\ExportDebug\HelloWorld.dll"'
A normal avalonia project appears to check the correct configuration:
08:54:22.145 [Information] 0 Starting previewer process for '"xxx\AvaloniaApplication1\AvaloniaApplication1.Desktop\bin\Debug\net7.0\AvaloniaApplication1.Desktop.dll"'
Switching configurations and working in "ExportDebug" allows it to work normally. I'm not sure of the origin of "ExportDebug". It's not a configuration I added to the project. It does not exist in an avalonia ui project created normally.
The helloworld example designer didn't work because it couldn't find "avalonia.png". It did work when I ran it, and after some investigation, the fix was to add a / to the image source:
<Image Source="/Avalonia.png" Width="64" Height="64" VerticalAlignment="Center" Grid.Column="0" />
I was hoping to leverage the skia context provided by this library outside of a render-pass to generate at runtime sprites of varying detail depending on the user's settings, or perhaps to use the skia context to render vector geometry in interesting ways at runtime (like for warning indicator hitbox hints or similar)
Looking at the API surface, is that possible?
How difficult would it be to have Godot entities that draw themselves using a skia API?
Hey, this has been working fantastically so far!
I was wondering though if it would be possible to add support for opening the file picker via the StorageProvider class from Avalonia?
I am assuming it doesn't right now because the platform is not being registered as a desktop with Avalonia?
(Avalonia docs for storage provider platforms)
Totally get if it isn't really feasible. If that is the case, it might be wroth mentioning in the to know
section on github.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.