summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* CSharpScript should not own base script signalsPaul Joannon2024-05-091-15/+26
|
* CSharpScript should not own method infos of the base classhuisedenanhai2024-05-041-8/+1
|
* Merge pull request #90968 from ↵Rémi Verschelde2024-04-221-2/+9
|\ | | | | | | | | | | raulsntos/fix-gdscript-analyzer-with-overloaded-dotnet-methods C#: Don't return MethodInfo for overloaded methods
| * C#: Don't return MethodInfo for overloaded methodsRaul Santos2024-04-211-2/+9
| | | | | | | | This means the GDScript analyzer loses the method signature information so it can't do type checking for the parameters.
* | Change order of operation for C# types reloadingPaul Joannon2024-04-181-25/+26
|/ | | | We now deserialize callables before reloading property states, in case a property is doing anything with the callable in its getter and/or setter.
* [.NET] Disable output embedding on macOS, move it to the advanced options on ↵bruvzg2024-04-091-109/+0
| | | | other platforms.
* Merge pull request #84947 from raulsntos/dotnet/instance_bindingsRémi Verschelde2024-04-041-21/+13
|\ | | | | | | C#: Use `get_instance_binding` instead of set
| * C#: Use `get_instance_binding` instead of setRaul Santos2023-11-151-21/+13
| |
* | Add methods to get argument count of methodsA Thousand Ships2024-03-101-0/+51
| | | | | | | | | | | | | | | | Added to: * `Callable`s * `Object`s * `ClassDB` * `Script(Instance)`s
* | Allow configuring the script filename casing ruleRedMser2024-03-051-0/+4
| | | | | | | | | | | | Defaults to "Auto", which detects the casing based on the preference of the currently selected language (C# for example prefers PascalCase whereas GDScript prefers snake_case).
* | Enhance cache modes in resource loadingPedro J. Estébanez2024-02-261-0/+2
| | | | | | | | | | | | | | - Unify documentation, hoping to clear misconcepctions about about propagation of the cache mode across dependant loads. - Clarify in docs that `CACHE_MODE_REPLACE` now also works on the main resource (from #87008). - Add two recursive modes, counterparts of `CACHE_MODE_REPLACE` and `CACHE_MODE_IGNORE`, since it seems some need them (see #59669, #82830). - Let resources, even loaded with one of the ignore-cache modes, get a path, which is useful for tools.
* | Fix Script Editor saves C# files as embedded scriptsNông Văn Tình2024-02-251-1/+16
| | | | | | | | | | | | | | fixes: #88543 fixes: #88160 Because of the limitations of compiled programming languages like C#, when a newly created *.cs file hasn't been compiled, we don't have any information about its `Path` or `Type` in the `assemply`. This means we end up creating an invalid instance of this file whenever there's a request. Consequently, multiple instances of the script can exist. When a new instance takes over the path, it clears the `path_cache` of the previous instance, leading to undefined behavior.
* | Merge pull request #87952 from paulloz/dotnet/byebye-signal-callback-generationRémi Verschelde2024-02-151-16/+5
|\ \ | | | | | | | | | Disable signal callback generation in C#
| * | Disable signal callback generation in C#Paul Joannon2024-02-141-16/+5
| | |
* | | Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-1/+1
| | |
* | | Improve handling of generic C# typesRaul Santos2024-02-081-66/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Create CSharpScript for generic C# types. - `ScriptPathAttributeGenerator` registers the path for the generic type definition. - `ScriptManagerBridge` lookup uses the generic type definition that was registered by the generator. - Constructed generic types use a virtual `csharp://` path so they can be registered in the map and loaded as if there was a different file for each constructed type, even though they all share the same real path. - This allows getting the base type for a C# type that derives from a generic type. - Shows base scripts in the _Add Node_ and _Create Resource_ dialogs even when they are generic types. - `get_global_class_name` implementation was moved to C# and now always returns the base type even if the script is not a global class (this behavior matches GDScript). - Create `CSharpScript::TypeInfo` struct to hold all the type information about the C# type that corresponds to the `CSharpScript`, and use it as the parameter in `UpdateScriptClassInfo` to avoid adding more parameters.
* | | C#: Fix crash when reloading scriptsRaul Santos2024-02-071-18/+7
|/ / | | | | | | | | | | The crash cond was accidentally moved to the `reload_scripts` method when it was only meant to be in the `reload_tool_script` method. Same about restarting the HotReloadAssemblyWatcher timer. Also removed the loop that checks if the script array contains a C# script because if we're in CSharpLanguage we can assume that at least one of them is.
* | Fixed ~CSharpScript() holding on to a mutex longer than necessary, creating ↵Michael Wörner2024-01-281-3/+5
| | | | | | | | potential for a deadlock.
* | Merge pull request #87550 from zaevi/fix_csharp_generic_reloadingRémi Verschelde2024-01-261-2/+8
|\ \ | | | | | | | | | C#: Fix sorting for generic types when reloading assemblies.
| * | C#: Fix sorting for generic types when reloading assemblies.Zae2024-01-261-2/+8
| | |
* | | Merge pull request #85504 from nongvantinh/fix-csharp-loaderRémi Verschelde2024-01-261-1/+4
|\ \ \ | |/ / |/| | | | | Fix C# script loader does not work reliably
| * | Fixes C# script loader does not work reliablyNông Văn Tình2024-01-221-1/+4
| | |
* | | Merge pull request #87286 from akien-mga/fix-preprocessor-if-ENABLED-checksYuri Sizov2024-01-171-3/+3
|\ \ \ | | | | | | | | | | | | Fix `#if *_ENABLED` inconsistencies, should check if defined
| * | | Fix `#if *_ENABLED` inconsistencies, should check if definedRémi Verschelde2024-01-171-3/+3
| | | | | | | | | | | | | | | | Co-authored-by: Caroline Joy Bell <halotroop2288@proton.me>
* | | | Merge pull request #86676 from rune-scape/sparse-script-reloadYuri Sizov2024-01-171-3/+20
|\ \ \ \ | |/ / / |/| | | | | | | GDScript: Hot-reload changed scripts only
| * | | Hot-reload only changed scriptsrune-scape2024-01-021-3/+20
| |/ /
* | | C#: Fix return type hint for methods.Zae2024-01-091-0/+2
| | |
* | | Add const lvalue ref to container parametersMuller-Castro2024-01-051-1/+1
| | |
* | | Inspector :warning: when C# props might be out of datePaul Joannon2023-12-221-0/+11
|/ /
* / C#: Fail `callp` silently if script is not validRaul Santos2023-11-141-6/+6
|/
* Merge pull request #83670 from raulsntos/notification-predelete-cleanupRémi Verschelde2023-11-091-10/+17
|\ | | | | | | Add `NOTIFICATION_PREDELETE_CLEANUP` notification to fix C# `Dispose()`
| * Add `NOTIFICATION_PREDELETE_CLEANUP` notificationRaul Santos2023-10-201-10/+17
| | | | | | | | New notification sent after `NOTIFICATION_PREDELETE` to let Objects cleanup at the very end, it should be the last notification sent.
* | Merge pull request #78157 from RedworkDE/net-shutting-down-abruptlyRémi Verschelde2023-10-311-0/+4
|\ \ | |/ |/| C#: Fix crash with `DisposablesTracker_OnGodotShuttingDown`
| * C#: Fix crash with `DisposablesTracker_OnGodotShuttingDown`RedworkDE2023-06-131-0/+4
| |
* | C#: Allow exporting games without C#Raul Santos2023-10-161-7/+7
| | | | | | | | When exporting a game that contains a C# solution, a feature is added so the exported game can check if it should initialize the .NET module. Otherwise, the module initialization is skipped so games without C# won't check for the assemblies and won't show alerts when they're missing.
* | Highlight doc comments in a different colorDanil Alexeev2023-10-081-0/+5
| |
* | Merge pull request #81101 from 398utubzyt/dotnet/abstract-class-supportRémi Verschelde2023-09-251-9/+12
|\ \ | | | | | | | | | C#: Add abstract class support
| * | C#: Abstract script class support398utubzyt2023-09-151-9/+12
| | |
* | | Merge pull request #78573 from dalexeev/editor-create-script-class-nameRémi Verschelde2023-09-251-4/+0
|\ \ \ | | | | | | | | | | | | Editor: Remove unused Class Name field from Create Script dialog
| * | | Editor: Remove unused Class Name field from Create Script dialogDanil Alexeev2023-09-121-4/+0
| |/ /
* | | Merge pull request #81783 from zaevi/fix-csharp-static-methodRémi Verschelde2023-09-201-0/+14
|\ \ \ | | | | | | | | | | | | C#: make C# static methods accessible.
| * | | C#: make C# static methods accessible.Zae2023-09-201-0/+14
| |/ /
* / / Editor: Improve signal callback generationDanil Alexeev2023-09-111-0/+5
|/ /
* | Merge pull request #81073 from raulsntos/dotnet/cached-string-namesRémi Verschelde2023-08-311-17/+7
|\ \ | | | | | | | | | C#: Replace `StringNameCache` with `SNAME`
| * | C#: Replace `StringNameCache` with `SNAME`Raul Santos2023-08-281-17/+7
| | |
* | | Fix Object::notification orderMarkus Sauermann2023-08-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the `p_reversed` parameter didn't influence the order in a correct way. Also script overridden _notification functions were not called in the correct order. To fix this some `notification` functions had to add a `p_reversed` parameter. This made it necessary to adjust cpp-bindings. Co-authored-by: David Snopek <dsnopek@gmail.com>
* | | Expose _validate_property() for scriptingkobewi2023-08-281-1/+20
|/ /
* | C#: Generate instance types for singletonsRaul Santos2023-08-061-1/+1
| |