Commit Graph

852 Commits

Author SHA1 Message Date
Joyless cf8e2be01c Improve MoveToward doc 2026-04-09 01:20:24 +01:00
Thaddeus Crews 618e55b48b Merge pull request #106765 from Delsin-Yu/dotnet-array-add-range-span
[.Net] Implement `AddRange(ROS)` for `Godot.Collections.Array(<T>)`
2026-04-01 18:10:28 -05:00
StarryWorm 4ae336740d Add missing resource_*.h includes
Add missing `resource_importer.h` includes
Add missing `resource_loader.h` includes
Add missing `resource_saver.h` includes
2026-03-27 07:03:39 -04:00
Thaddeus Crews ffec02fee7 Merge pull request #117617 from raulsntos/dotnet/fix-116169
Revert "[.NET] Remove EFS update on reloading assemblies" but with deferred call
2026-03-19 10:20:00 -05:00
Raul Santos 37481d6613 Revert "[.NET] Remove EFS update on reloading assemblies" but with deferred call
It turns out this call was needed after all, it ensures new scripts are included
in the global class list by updating EFS for them. In my previous PR I must've
only tested scripts that have been opened or loaded by the editor at some point
so I didn't encounter the bug.

This reverts the previous PR but with a deferred call to avoid reintroducing
the bug that the PR fixed. Updating EFS here is still too early, so we defer
the call to ensure the type info is available.
2026-03-19 09:17:26 +01:00
DE YU 1f8c856870 [.Net] Implement AddRange(ROS) for Array 2026-03-19 14:45:01 +08:00
Thaddeus Crews 8d403a7c0c Merge pull request #114509 from Joy-less/fix-bugs-in-C#-StringExtensions
Fix bugs in C# StringExtensions
2026-03-18 11:43:33 -05:00
Joyless e51107503d Fix bugs in C# StringExtensions
Co-Authored-By: Raul Santos <raulsntos@gmail.com>
2026-03-18 00:45:45 +00:00
Rémi Verschelde 6d309c858e Remove unused includes in modules with clangd-tidy 2026-03-16 16:40:39 +01:00
Rémi Verschelde 6b441ab6a4 Bump version to 4.7-dev 2026-01-26 17:40:46 +01:00
PixelDough b5591bf5f6 change AsSpan to use a range from "from" to "end"
the current code assumes that float.Parse behaves the same as the
internal C++ code, however without using "end" as part of the span, it
will parse from index 0 to the end of the string, ignoring commas. for
example, this causes it to parse "0,5,0" with divisor "," as [50, 50,
0], as the float.Parse method ignores commas in floats.

if another divisor is used, it throws a System.FormatException due to
containing invalid characters, as it fails to account for the position
of the divisor for the span.
2025-11-18 00:44:51 -06:00
Raul Santos 513e421209 [.NET] Add compat method for DisplayServer.TtsSpeak 2025-11-15 05:55:03 +01:00
Thaddeus Crews 98014e504e Merge pull request #108885 from aaronfranke/csharp-public-explicit
Use explicit public access modifier in C# code
2025-11-04 19:48:17 -06:00
Kevin Lam e6f441ea64 Fix dotnet class lookup returning modified names instead of engine names 2025-10-25 10:04:23 -05:00
Thaddeus Crews 3f4c15283e Merge pull request #108487 from raulsntos/dotnet/remove-efs-update
[.NET] Remove EFS update on reloading assemblies
2025-10-20 18:09:44 -05:00
Lukas Tenbrink 1bf821c1e1 Store current capacity in CowData buffers, and rewrite most of it.
Add `reserve` to `CowData`, `Vector` and `Array`.

# Conflicts:
#	core/os/memory.h
#	core/templates/cowdata.h
2025-09-25 22:00:17 +02:00
Aaron Franke 9993438a9e Use explicit public access modifier in C# code 2025-09-24 14:32:38 -07:00
Thaddeus Crews d8b057d06d Merge pull request #108974 from Joy-less/Improve-IsNormalized()
Improve `IsNormalized()` in C#
2025-09-22 08:50:06 -05:00
Thaddeus Crews 7738626d25 Merge pull request #107800 from Joy-less/add-ROS-overload-for-Callable.Call
Add `ReadOnlySpan<Variant>` overload for `Callable.Call`
2025-09-20 13:41:36 -05:00
Thaddeus Crews 9a76f55518 [C#] Add documentation for Interfaces/Attributes 2025-09-19 11:57:42 -05:00
Thaddeus Crews 8b4b93a82e Merge pull request #105950 from Joy-less/Fix-array-span-constructors
Fix array span constructors in C#
2025-09-17 11:34:19 -05:00
Thaddeus Crews f73d3db412 Merge pull request #108527 from raulsntos/dotnet/enum-variant-conversion
[.NET] Fix enum from/to Variant conversion
2025-09-16 11:44:50 -05:00
Thaddeus Crews c2141e0aa5 Bump version to 4.6-dev 2025-09-15 15:50:22 -05:00
Thaddeus Crews 37a48c89f9 Merge pull request #106744 from L2750558108/fix-@-error-in-c#
Fix source generator exceptions appearing when use "@+internal keyword" as type or namespace name in C# script
2025-08-24 11:04:31 -05:00
2750558108 f192430921 Fix source generator exceptions appearing when use "@+internal keyword" as type or namespace name in C# script 2025-08-09 13:25:54 +08:00
Raul Santos dd662f9c6a [.NET] Fix Quaternion(Vector3, Vector3) constructor when vectors are the same. 2025-08-03 20:26:20 +02:00
Joyless cbc7dac0d5 Improve IsNormalized() 2025-07-25 17:53:38 +01:00
Raul Santos 8950744921 [.NET] Fix enum from/to Variant conversion
- `typeof(T).IsEnum` and `typeof(T).GetEnumUnderlyingType()` are intrinsified in .NET 8+ so we can simplify the code in VariantUtils a bit.
- Consider whether enum `T` is signed in VariantUtils to preserve it.
2025-07-11 20:14:23 +02:00
Thaddeus Crews afd16dd4f3 Merge pull request #99798 from preslavnpetrov/master
[C#] Fix thread deadlock when using a worker thread to load a script with a generic base class
2025-07-09 11:33:20 -05:00
A Thousand Ships f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
Raul Santos 7860bc82b2 [.NET] Remove EFS update on reloading assemblies
Updating the files at this point is too early, the scripts haven't been updated yet so their type info is empty.

It looks like EFS is updated anyway without doing it explicitly in `LookupScriptsInAssembly`, and it happens after the scripts have updated their info. So this code seems unnecessary.
2025-07-03 21:57:37 +02:00
Preslav.Laptop 85d2a23a62 Move the script reload function to outside the
lock to prevent worker threads from the
ResourceLoader::load method from causing a
deadlock
2025-07-02 19:11:20 +02:00
Thaddeus Crews f8b2f1bc82 Merge pull request #101006 from zaevi/fix_csharp_refcounted_dispose
C#: Fix `RefCounted` not disposed correctly in certain case
2025-07-01 17:58:00 -05:00
Rémi Verschelde 5aefc2eca8 Merge pull request #108041 from bs-mwoerner/cs_get_extension
C#: Fix return value of `StringExtensions.GetExtension()`
2025-06-28 13:03:24 +02:00
Michael Wörner 77208a62a4 Fix String.GetExtension() return value.
It previously returned the string itself when it should return an empty string according to the docs/examples and the C++ counterpart String::get_extension().
2025-06-27 12:01:11 +02:00
danielgsilva ed1e8a1460 Fix mismatch of constructors 2025-06-26 10:35:47 +01:00
Joyless d956bcf749 Add ROS overload for Callable.Call 2025-06-21 13:43:52 +01:00
Rémi Verschelde 7e9b709917 Merge pull request #102837 from raulsntos/dotnet/fix-reload-callables
[.NET] Skip serializing delegates with a disposed target
2025-06-13 15:53:33 +02:00
Rémi Verschelde d1083c9722 Improve error messages for method calls expecting only 1 argument 2025-06-12 17:02:59 +02:00
LuoZhihao 44f5974bb7 C#: Add Basis.ScaledLocal 2025-06-09 12:32:48 +08:00
Rémi Verschelde 9d0b4ee74f Merge pull request #105927 from Joy-less/Don't-create-unnecessary-arrays-in-C#
Don't create unnecessary arrays in C#
2025-06-05 13:11:06 +02:00
LuoZhihao fc8328d5f1 C#: Expose byte array compress and decompress 2025-05-25 23:42:23 +08:00
Joyless 14783cd8b8 Fix array span constructors 2025-05-13 13:28:00 +01:00
Rémi Verschelde 599a956f6f Merge pull request #106177 from eyalzus12/feature/stackalloc-Projection
C#: Use `stackalloc` to create the pivot arrays in `Projection.Inverse`
2025-05-13 01:05:00 +02:00
Rémi Verschelde b44aa1ad9d Merge pull request #105104 from Joy-less/use-frozen-dictionary
Use `FrozenDictionary` for `NamedColors`
2025-05-13 01:04:39 +02:00
EyalZusiman 2ebfeef4a8 C#: use stackalloc to create the pivot arrays in Projection.Inverse 2025-05-08 18:27:32 +03:00
Fredrik Lindahl 01056f369a [.NET] Avoid heap allocation when using StringNames as key in a Collection.Dictionary.
Changed StringName GetHashCode to call godot_string_name.GetHashCode instead of godot_string_name's (which was not overridden) as this otherwise leads to heap allocations when e.g. calling the indexer in a Dictionary with `StringName` type as Key.
2025-05-08 08:41:22 +02:00
Joyless e9da0dfd30 Don't create unnecessary arrays in C# 2025-04-29 23:57:26 +01:00
Thaddeus Crews 561dc6ced6 Merge pull request #104689 from Delsin-Yu/csharp-getset-alloc-perf
[.Net] Avoid unnecessary StringName allocations on not implemented virtual _Get and _Set method call
2025-04-14 19:39:53 -05:00
DE-YU_H14 f0ec392bb1 [.Net] Avoid StringName allocations if type does not defines _Get or _Set 2025-04-12 03:39:24 +08:00