263 Commits

Author SHA1 Message Date
Aaron Franke
60d34604d5 [3.x] Fix Translated method in C# affecting the original transform
(cherry picked from commit 4d6c609e5086f4706851567357c215355678d075)
2022-08-01 10:54:44 +02:00
Raul Santos
51bcfd53b4
Fix marshaling values of generic Godot Dictionary
(cherry picked from commit e4c40efeab321d84de658b1d1220d07c9eec43c9)
2022-01-25 18:42:08 +01:00
Rémi Verschelde
71066cd63b
Update copyright statements to 2022
Happy new year to the wonderful Godot community!

(cherry picked from commit a627cdafc53bd9d986471fcaceac7e51213a7a68)
2022-01-13 16:00:37 +01:00
Rémi Verschelde
2e8fdd0112
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit b197de6f5f1e61a9cecf0a29aadea0fb024b1edf)
2022-01-07 00:17:47 +01:00
Raul Santos
b096c4b05f
Fix KeyValuePairAt memory leak
(cherry picked from commit 1fdfc379b6230b7d3dac4f22c846c45e93cd596d)
2022-01-06 00:58:30 +01:00
Aaron Franke
a5543bc35e
[3.x] Warn when using the dectime method
dectime has been removed in the master branch (what will be Godot 4.0)
2021-09-21 10:03:42 -05:00
Aaron Franke
298e29c772
[3.x] Some more C# formatting and style fixes 2021-09-18 12:11:03 -05:00
Rémi Verschelde
bb2772d2f2
Merge pull request #52762 from magian1127/3.xTemp1 2021-09-18 14:51:07 +02:00
Magian
0263a87c8b C#, replace the current Xform method with a * operator. 2021-09-18 20:40:08 +08:00
Rémi Verschelde
316b5dad2d
Merge pull request #52390 from raulsntos/csharp-docs-3.x
[3.x] Add documentation to GodotSharp
2021-09-18 01:00:03 +02:00
Raul Santos
6a7ca43297
Expose String.SimplifyPath in C#
(cherry picked from commit 126b1ea1493f603684a361f92865d4c80bca0ed4)
2021-09-14 13:41:26 +02:00
Raul Santos
cacf3e28fd Add documentation to GodotSharp
- Adds documentation to almost every class and member in `GodotSharp`
- Fixes some old documentation to more closely follow the XML comments convention
2021-09-04 20:15:53 +02:00
Rémi Verschelde
f0b37b1519
doc: Point URLs to 3.4 version of the online docs 2021-08-12 17:08:10 +02:00
Rémi Verschelde
70784f983b
Mono: Remove diagnostics incompatible with 3.x codebase 2021-08-06 12:59:17 +02:00
Raul Santos
332e31260e
Reduce C# Dictionary internal calls
- Implements new `KeyValuePairs` and `KeyValuePairAt` internal calls
to get the `key` and the `value` in one call.
- Caches the `DictionaryEntry` to reuse properties without repeating
internal calls.

(cherry picked from commit 2deefd938fbbaf6c8472031de8b631ab505b3cfc)
2021-08-06 11:10:04 +02:00
Raul Santos
ca32c18458
Add documentation to Dictionary in C#
Adds documentation to `Godot.Collections.Dictionary` in C#.

(cherry picked from commit 0669ffcd157dffb3e284457e968e617431badfd7)
2021-08-06 11:09:56 +02:00
Raul Santos
5c206c38f9
Simplify C# print methods
- Extracts the parameters logic to a single method
- Simplify the handling of null parameters

(cherry picked from commit ad460cde7988e42acd4ec8d7c35d9c50f7c063a7)
2021-08-05 16:35:55 +02:00
Raul Santos
ecb973ab02
Use allowEmpty parameter in Split
(cherry picked from commit b7a66a820b88002e734a8e7e7c31992cb7d37fdd)
2021-08-03 09:15:33 +02:00
Aaron Franke
1180256090
Add documentation to Array in C#
(cherry picked from commit 080f44a3b711f7a78fc2f318fd5dca095202bce5)
2021-07-26 13:35:52 +02:00
Raul Santos
6ea8334012
Fix documentation in StringExtensions
(cherry picked from commit ba99387bf380122afcd59263f1a3b1cf30db9d0f)
2021-07-26 13:35:12 +02:00
Aaron Franke
17551fe29e
[3.x] Add a simple C# .editorconfig 2021-07-24 16:27:57 -04:00
JestemStefan
9513354f68 Added signed_angle_to for Vector3
Added signed_angle_to method for Vector3

Added signed_angle_to for Vector3

formatting fix...
2021-07-09 12:49:12 +02:00
Aaron Franke
85a0345d57
[3.x] Add Quat angle_to method 2021-06-18 11:00:44 -04:00
Marcel Admiraal
7e03bd1671 Remove duplicate WARN_PRINTS macro 2021-06-18 12:57:59 +01:00
Marcel Admiraal
5a58516231 Remove duplicate ERR_PRINTS macro 2021-06-16 11:56:25 +01:00
Rémi Verschelde
80e1585a6e
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.

(cherry picked from commit c1c76850cb47c0f8451fce6353958006e95b2cda)
2021-06-07 12:06:59 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
kleonc
4d7f642fb3 Improve some argument names for core types 2021-04-23 15:34:24 +02:00
Rémi Verschelde
015973df04
doc: Make all tutorial links point to 3.3 branch of docs 2021-03-26 10:43:43 +01:00
Ilya Kuznetsov
cacf96962d
Added mono_unhandled_exception call to unhandled_exception hook
(cherry picked from commit 6061ff7ba11d3123bc4a2d7981a31b735f5dcf8d)
2021-03-17 15:17:02 +01:00
Aaron Franke
b2d723b039 Add generic support to PackedScene.Instance
(cherry picked from commit 3f50954ced85474b3f92d26dbe7bd634f873b378)
2021-03-02 10:26:14 +01:00
zaevi
f94dffd2de
Fix C# string.Hash()
(cherry picked from commit baac70c27efb661e2d3f4127210e7ec991793078)
2021-02-02 13:30:54 +01:00
Aaron Franke
226528097e
[3.2] Backport hex_to_int/bin_to_int zero check and C# changes 2021-01-28 09:24:44 -05:00
Rémi Verschelde
49646383f1
Update copyright statements to 2021
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 🎆

(cherry picked from commit b5334d14f7a471f94bcbd64d5bae2ad853d0b7f1)
2021-01-13 16:17:06 +01:00
Ignacio Etcheverry
1a5e985ed4 [3.2] Mono: Make Godot provide its own WASM m2n trampolines
This depends on a custom Mono patch from this commit:
godotengine/godot-mono-builds@0e312939bd
2020-12-14 19:46:41 +01:00
Aaron Franke
3b10458a5d
Add HexEncode to C#
(cherry picked from commit 6b54d7dde1d5afd49c18d33a63a4befc0176ca33)
2020-11-17 12:02:00 +01:00
Aaron Franke
e3419a7fe1
Add LStrip and RStrip to C# strings
(cherry picked from commit c89af1d433d4ca88e8fa435d4c3c8fce4d37011c)
2020-11-17 12:01:59 +01:00
Aaron Franke
9c83b8ed70
[3.2] Improve comments in Color documentation 2020-11-14 04:56:18 -05:00
Yuri Roubinsky
23620ff046
[Mono] Added Shuffle method to Array
(cherry picked from commit 156e4043b400481ab01261353ee26ad7af9e3fb9)
2020-11-11 15:30:57 +01:00
Aaron Franke
1bb81488bb
Minor clamp and float fixes
(cherry picked from commit ee79fc627c18d26221adeae2b641ba81ba662184)
2020-11-11 15:30:57 +01:00
Aaron Franke
730d42d8a4
Add GetStringFromUTF8 and GetStringFromASCII
(cherry picked from commit 029de5200135e68cd6cd2727fa110fa50100849d)
2020-10-19 16:10:01 +02:00
Aaron Franke
ea3bbbe0f2
Add concatenation support and a new ctor to Godot.Collections.Array
(cherry picked from commit a4dcd48d16f79418b0f709d94ac250df5acf4c3a)
2020-09-24 14:43:10 +02:00
Ricardo Alcantara
197b375b89
Basis RotationQuat should be public.
(cherry picked from commit a676b8ea66d41cf5aebfa04d4f1239203b031c8f)
2020-09-24 14:43:08 +02:00
Aaron Franke
1dcbcaaa0d
Change inequality comparison operators to use exact equality
(cherry picked from commit d0a1399a1b7ef6b76f6e6094fb6dd6bd9b43d2c8)
2020-09-24 14:43:08 +02:00
Zae
e5b357cfb1
Fix C# string.IsAbsPath()
(cherry picked from commit b5eea5cfd426115969d3382505a508cc866959ba)
2020-09-24 14:43:08 +02:00
Raul Santos
cf45fa7f36
Fix ExprMatch stackoverflow
(cherry picked from commit d425cf6fed8abb29ab590f7ef866219e6b130ac4)
2020-09-24 14:43:07 +02:00
Ignacio Etcheverry
c3954441f3 3.2 New csproj style with backport of Godot.NET.Sdk
This is a cherry-pick of
ced77b1e9b5ffe0eb66de3d730d8583d12366c91
with several 3.2 specific alterations.

There are a lot of build issues coming from
old style projects. At this point fixing every
single one of those would require adding patch
after patch to the project file, which is a
considerable amount work and makes the csproj
even more bloated than it already is.

As such I decided this effort would be better
spent back-porting the Sdk style support that's
already available in 4.0-dev to the 3.2 branch.

This will prevent many issues, but it will also
introduce other benefits, among them:

- While target framework stays as .NET Framework
  v4.7.2, it can be changed to .NET Standard 2.0
  or greater if desired.
- It makes it much easier to add future patches.
  They are added to Godot.NET.Sdk and the only
  change required in Godot code is to update the
  Sdk version to use.
- Default Godot define constants are also
  backported, which fixes IDE issues with the
  preprocessor.

There are a few differences in the changes
applied during patching of the csproj compared
to 4.0 with the purpose of preventing breaking
builds:

- 'TargetFramework' stays net472 both for new
  projects and when importing old ones. It can
  be manually changed to netstandard 2.0+ if
  desired though.

The following features are enabled by default for
new projects. Enabling them in imported projects
may result in errors that must be fixed manually:

- 'EnableDefaultCompileItems' is disabled as it
  can result in undesired C# source files being
  included. Existing include items are kept.
  As long as 'EnableDefaultCompileItems' remains
  disabled, Godot will continue taking care of
  adding and removing C# files to the csproj.
- 'GenerateAssemblyInfo' is disabled as it
  guarantees a build error because of conflicts
  between the existing 'AssemblyInfo.cs' and the
  auto-generated one.
- 'Deterministic' is disabled because it doesn't
  like wildcards in the assembly version (1.0.*)
  that was in the old 'AssemblyInfo.cs'.

Of importance:

This is a breaking change. A great effort was
put in avoiding build errors after upgrading a
project, but there may still be exceptions.

This also breaks forward compatibility. Projects
opened with Godot 3.2.3 won't work out of the box
with older Godot versions. This was already the
case with changes introduced in 3.2.2.

Albeit C# support in 3.2.x was still labeled as
alpha, we've been trying to treat it as stable
for some time. Still the amount of problems this
change solves justifies it, but no more changes
that break project compatibility are to be
introduced from now on (at least for 3.x).
2020-08-20 21:48:59 +02:00
mega-bit
93f297e1d5 Fix typos in GodotSharp code docs
(cherry picked from commit 0ca96ae2c16621115f3cc251cad0a5bad345ba09)
2020-07-24 10:31:57 +02:00
Aaron Franke
e10a1e078f
[3.2] Add C# XML documentation to core C# math types 2020-07-21 21:22:54 -04:00
endlesstravel
13d4813ddf fix crash when pass null in print array in GD.print
fix crash when pass null in print array in GD.print 2

fix crash when pass null in print array in GD.print 3

fix space

(cherry picked from commit d2461bad637c65fa41150725eeae4bb197662ea3)
2020-07-03 15:38:07 +02:00