summaryrefslogtreecommitdiff
path: root/modules/mono/glue
AgeCommit message (Collapse)Author
2021-03-08Merge pull request #46174 from xill47/mono-appdomain-unhandled-exception-eventRémi Verschelde
Added mono_unhandled_exception call to unhandled_exception hook
2021-03-08Added mono_unhandled_exception call to unhandled_exception hookIlya Kuznetsov
2021-03-07Merge pull request #46713 from neikeq/csharp-source-generators-initRémi Verschelde
Add C# source generator for ScriptPathAttribute
2021-03-06Add C# source generator for a new ScriptPath attributeIgnacio Etcheverry
This source generator adds a newly introduced attribute, `ScriptPath` to all classes that: - Are top-level classes (not inner/nested). - Have the `partial` modifier. - Inherit `Godot.Object`. - The class name matches the file name. A build error is thrown if the generator finds a class that meets these conditions but is not declared `partial`, unless the class is annotated with the `DisableGodotGenerators` attribute. We also generate an `AssemblyHasScripts` assembly attribute which Godot uses to get all the script classes in the assembly, eliminating the need for Godot to search them. We can also avoid searching in assemblies that don't have this attribute. This will be good for performance in the future once we support multiple assemblies with Godot script classes. This is an example of what the generated code looks like: ``` using Godot; namespace Foo { [ScriptPathAttribute("res://Player.cs")] // Multiple partial declarations are allowed [ScriptPathAttribute("res://Foo/Player.cs")] partial class Player {} } [assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })] ``` The new attributes replace script metadata which we were generating by determining the namespace of script classes with a very simple parser. This fixes several issues with the old approach related to parser errors and conditional compilation. It also makes the task part of the MSBuild project build, rather than a separate step executed by the Godot editor.
2021-02-25Add generic support to PackedScene.InstanceAaron Franke
2021-02-16Added signed_angle_to for Vector3JestemStefan
2021-02-13Fix Mono build after resource load cache changesXartorx
2021-02-01Replace ColorN and from HTML with a string constructorAaron Franke
2021-02-01Fix C# string.Hash()zaevi
2021-01-28Unify URI encoding/decoding and add to C#Aaron Franke
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28Make hex_to_int and bin_to_int handle the prefix automaticallyAaron Franke
Also add BinToInt to C#
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Merge pull request #44586 from madmiraal/rename-stepifyRémi Verschelde
Rename Math::stepify to snapped
2020-12-28Rename Math::stepify to snappedMarcel Admiraal
2020-12-28Rename Rect2 and Rect2i grow_margin() to grow_side()Marcel Admiraal
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-26Update Rect intersection documentation, and rename method on MonoNathan Franke
2020-12-17Merge pull request #44105 from neikeq/mono-wasm-m2n-hookRémi Verschelde
Mono: Make Godot provide its own WASM m2n trampolines
2020-12-14Mono: Make Godot provide its own WASM m2n trampolinesIgnacio Etcheverry
This depends on a custom Mono patch from this commit: godotengine/godot-mono-builds@0e312939bd0dc4b807cc15dbe76a7b65456ab928
2020-12-07Improve argument names for core typesAaron Franke
2020-11-16Merge pull request #43250 from aaronfranke/strext-lstripRémi Verschelde
Add LStrip, RStrip, and HexEncode to C#
2020-11-13Improve comments in Color documentationAaron Franke
2020-11-11Removing unneeded FuncRef code in C#Grzegorz Puławski
2020-11-10Minor clamp and float fixesAaron Franke
2020-11-10Updated gd_glue.cpp to work with the latest changes in the variant refactoringAdrian Adeva
Without this change the engine dont compile with the mono module enabled.
2020-11-09Add HexEncode to C#Aaron Franke
2020-11-09Add LStrip and RStrip to C# stringsAaron Franke
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-07[Mono] Added Shuffle method to ArrayYuri Roubinsky
2020-11-06Exposed randi_range to global funcs + renamed rand_range to randf_rangeYuri Roubinsky
2020-11-03Remove `Color.contrasted()` as its behavior is barely usefulHugo Locurcio
Returning the most contrasting color isn't a trivial task, as there are often many possible choices. It's usually best left for the user to implement using a script.
2020-10-26C#: Fix custom event signals crash on hot-reloadIgnacio Etcheverry
Cleanup and re-initialization of event signals before and after hot-reload should be working correctly now.
2020-10-18Refactor MethodBind to use variadic templatesreduz
Removed make_binders and the old style generated binders.
2020-10-17Add GetStringFromUTF8 and GetStringFromASCIIAaron Franke
2020-10-06Improve the Vector2 rotated code in C#Aaron Franke
2020-09-24Merge pull request #42293 from ricardoalcantara/fix_basis_csharpRémi Verschelde
Basis RotationQuat should be public.
2020-09-24Basis RotationQuat should be public.Ricardo Alcantara
2020-09-23Fix C# string.IsAbsPath()Zae
2020-09-16Fix ExprMatch stackoverflowRaul Santos
2020-09-12Add concatenation support and a new ctor to Godot.Collections.ArrayAaron Franke
2020-09-08Change inequality comparison operators to use exact equalityAaron Franke
2020-09-01Simplify html_is_valid and allow it to work with 3 and 4 hex digitsAaron Franke
2020-09-01Change Color HTML conversion from ARGB to RGBAAaron Franke
Also add support for 3 and 4 digit values in C#. Now it actually matches the HTML/CSS spec.
2020-07-26Merge pull request #40595 from neikeq/godot-net-sdk-and-net-standardRémi Verschelde
C#: Switch games to MSBuild Sdks and .NET Standard
2020-07-25C#: Switch games to MSBuild Sdks and .NET StandardIgnacio Etcheverry
Godot.NET.Sdk ------------- Godot uses its own custom MSBuild Sdk for game projects. This new Sdk adds its own functionality on top of 'Microsoft.NET.Sdk'. The new Sdk is resolved from the NuGet package. All the default boilerplate was moved from game projects to the Sdk. The default csproj for game project can now be as simple as: ``` <Project Sdk="Godot.NET.Sdk/4.0.0-dev2"> <PropertyGroup> <TargetFramework>netstandard2.1</TargetFramework> </PropertyGroup> </Project> ``` Source files are included by automatically so Godot no longer needs to keep the csproj in sync when creating new source files. Define constants ---------------- Godot defines a list of constants for conditional compilation. When exporting games, this list also included engine 'features' and platform 'bits'. There were a few problems with that: - The 'features' constants were only defined when exporting games. Not when building the game for running in the editor player. - If the project was built externally by an IDE, the constants wouldn't be defined at all. The new Sdk assigns default values to these constants when not built from the Godot editor, i.e.: when built from an IDE or from the command line. The default define constants are determined from the system MSBuild is running on. However, it's not possible for MSBuild to determine the set of supported engine features. It's also not possible to determine if a project is being built to run on a 32-bit or 64-bit Godot executable. As such the 'features' and 'bits' constants had to be removed. The benefit of checking those at compile time was questionable, and they can still be checked at runtime. The new list of define constants includes: - GODOT - GODOT_<PLATFORM> Defaults to the platform MSBuild is running on. - GODOT_<PC/MOBILE/WEB> - TOOLS When building with the 'Debug' configuration (editor and editor player). - GODOT_REAL_T_IS_DOUBLE Not defined by default unless $(GodotRealTIsDouble) is overriden to be 'true'. .NET Standard ------------- The target framework of game projects was changed to 'netstandard2.1'.
2020-07-22Fix typos in GodotSharp code docsmega-bit
2020-07-21Fix XML in Plane.csAaron Franke
2020-07-21Update core documentation to match recent C# changesAaron Franke
Also a few minor API changes like adding AABB.abs() Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-07-11Add C# XML documentation to core C# math typesAaron Franke
2020-07-05Merge pull request #40137 from neikeq/fix-clangtidy-warnings-monoRémi Verschelde
Mono/C#: Fix several clang-tidy warnings and cleanup