summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Mono: Lazily load scripts metadata fileIgnacio Etcheverry2019-04-261-2/+7
|/ | | | - Only load the scripts metadata file when it's really needed. This way we avoid false errors, when there is no C# project, about missing scripts metadata file.
* Merge pull request #27950 from Nonnu42/contribIgnacio Roldán Etcheverry2019-04-121-0/+29
|\ | | | | Fixes #17233 allowing C# to override _GetPropertyList
| * Fixes #17233 allowing C# to override _GetPropertyListNuno Cardoso2019-04-121-0/+29
| |
* | C#: Support type hints for exported ArraysIgnacio Etcheverry2019-04-061-1/+8
| | | | | | | | Added the code for Dictionary as well, but it's not yet supported by the Godot inspector.
* | C#: Add marshalling support for IEnumerable and IDictionaryIgnacio Etcheverry2019-04-061-3/+3
| | | | | | | | | | Added constructor that takes IEnumerable for Array and IEnumerable<T> for Array<T>. Added constructor that takes IDictionary for Dictionary and IDictionary<TKey, TValue> for Dictionary<TKey, TValue>.
* | Mono: Make missing default constructor error more foolproofForLoveOfCats2019-04-041-3/+3
|/
* C#: Update exports only in the editorIgnacio Etcheverry2019-03-131-0/+3
|
* Fix CSharpInstance::set not working with base classesIgnacio Etcheverry2019-03-081-2/+2
|
* Merge pull request #26773 from neikeq/issue-26628Rémi Verschelde2019-03-071-1/+4
|\ | | | | Mono: Fix crash with exported field of custom Reference derived type
| * Mono: Fix crash with exported field of custom Reference derived typeIgnacio Etcheverry2019-03-071-1/+4
| |
* | Mono: Partially implement some Godot debug api functionsIgnacio Etcheverry2019-03-071-9/+48
|/ | | | Debug breaks sent with debug_break and debug_break_parse should display correctly in the Godot debugger now.
* Merge pull request #26765 from neikeq/issue-25959Ignacio Etcheverry2019-03-071-0/+7
|\ | | | | Mono: Fix crash when re-using script binding after domain reloading
| * Mono: Fix crash when re-using script binding after domain reloadingIgnacio Etcheverry2019-03-071-0/+7
| |
* | Update scripts exports even when normal script instances are created to ↵Sebastian Hartte2019-03-071-0/+1
|/ | | | better support tool scripts with exported variables.
* Mono: Fail on script instance creation if constructor was not foundIgnacio Etcheverry2019-02-281-3/+30
| | | | Previously this would result in NULL dereferencing. Now we fail with an error.
* Fix -Wsign-compare warnings.marxin2019-02-271-2/+2
| | | | | I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-4/+4
| | | | Fixes #25316.
* Use script instance binding for objects constructed from C#Ignacio Etcheverry2019-02-091-8/+13
| | | | | | | Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed. Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems. Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
* Mono: Lifetime fixes for CSharpInstance and instance binding dataIgnacio Etcheverry2019-02-031-65/+153
| | | | | | | Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner). It's now safe to replace the script instance without leaking or crashing. Also fixed godot_icall_Object_weakref return reference being freed before returning.
* Mono: CleanupIgnacio Etcheverry2019-02-031-6/+6
|
* Mono: Fix hot reload build errors and cleanupIgnacio Etcheverry2019-01-221-4/+17
|
* Mono: Add assembly reloading to running gamesIgnacio Etcheverry2019-01-211-24/+3
| | | | Add environment variable to specify a custom --debugger-agent for mono.
* C#: Fix crash due to missing gchandle ref null checkIgnacio Etcheverry2019-01-171-1/+1
|
* Merge pull request #24877 from neikeq/issue-24280Rémi Verschelde2019-01-101-7/+7
|\ | | | | Fix properties being lost when reloading placeholder GDScript instance
| * Fix properties being lost when reloading placeholder GDScript instanceIgnacio Etcheverry2019-01-101-7/+7
| | | | | | | | | | | | | | During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing. The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance. I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings).
* | Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Tweaks after feedbackBen Rog-Wilhelm2018-12-081-0/+1
| |
* | Implement CSharpScript::get_script_method_list and related functionality.Ben Rog-Wilhelm2018-12-071-0/+30
|/
* Fix crash due to ~CSharpInstance() being called on freed instanceIgnacio Etcheverry2018-12-011-3/+6
| | | | This would be the case when calling SetScript on an object with a C# script.
* Implement CSharpScript::is_valid()Ignacio Etcheverry2018-11-301-4/+0
|
* Merge pull request #24091 from neikeq/iiIgnacio Etcheverry2018-11-301-288/+295
|\ | | | | C#: Improve tool script support and fix reloading issues
| * C#: Improve tool script support and fix reloading issuesIgnacio Etcheverry2018-11-301-288/+295
| |
* | Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky2018-11-271-0/+4
|/ | | | tools), fixes #17070
* Improve the C# API projects generationIgnacio Etcheverry2018-11-081-1/+2
| | | | | | - Now there is only one solution that contains both GodotSharp and GodotSharpEditor project. Previously we had one solution for each project - GodotSharpEditor reference GodotShatp with a 'ProjectReference'. Previously it was a 'Reference' to the assembly - This also simplifies the command line option to generate this solution: 'godot --generate-cs-api <OutputDir>'
* Merge pull request #23162 from neikeq/ccIgnacio Etcheverry2018-10-251-42/+92
|\ | | | | Proper support for namespaces and other enhancement/fixes
| * Parse C# script namespace and classIgnacio Etcheverry2018-10-251-42/+92
| | | | | | | | - Added a very simple parser that can extract the namespace and class name of a C# script.
* | C#: Fix crash when disposing Reference on domain finalizeIgnacio Etcheverry2018-10-251-0/+2
|/
* Remove redundant "== false" codeAaron Franke2018-10-061-1/+1
| | | | | | Some of this code has been re-organized. f
* Remove redundant "== true" codeAaron Franke2018-10-061-2/+2
| | | If it can be compared to a boolean, it can be evaluated as one in-place.
* Mono: Fix not creating generic Array or Dictionary where expectedIgnacio Etcheverry2018-09-271-1/+1
|
* Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli2018-09-151-2/+2
| | | | | NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
* Rename slave keyword to puppetFabio Alessandrelli2018-09-151-3/+5
| | | | | The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
* Mono: Fix build regression due to wrong return typeIgnacio Etcheverry2018-09-121-2/+2
|
* C#: Fix explicit enum values when exporting memberIgnacio Etcheverry2018-09-121-31/+86
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-4/+4
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fix/workaround for issue #21667Ignacio Etcheverry2018-09-121-80/+262
| | | | When a Reference managed instance is garbage collected and its finalizer is called, it could happen that the native instance is referenced once again before the finalizer can unreference and memdelete it. The workaround is to create a new managed instance when this happens (at least for now).
* Cleanup of c# api files and bindings generatorIgnacio Etcheverry2018-09-121-1/+1
| | | | | | | | | | | | - We no longer generate RID and NodePath C# classes. Both will be maintained manually. - We no longer generate C# declarations and runtime registration of internal calls for the following classes: RID, NodePath, String, GD, SignalAwaiter and Godot.Object (partial base). - We no longer auto-generate the base members of Godot.Object. They will be maintained manually as a partial class. This makes it easier to maintain these C# classes and their internal calls, as well as the bindings generator which no longer generates C# classes that don't derive from Godot Object, and it no longer generates the Godot.Object base members (which where unreadable in the bindings generator code). - Added missing 'RID(Object from)' constructor to the RID C# class. - Replaced MONO_GLUE_DISABLED constant macro with MONO_GLUE_ENABLED. - Add sources in module/mono/glue even if glue is disabled, but surround glue files with ifdef MONO_GLUE_ENABLED.
* Merge pull request #16927 from neikeq/rework-refcount-notifyJuan Linietsky2018-08-251-4/+71
|\ | | | | Notify instance binding data api of refcount increment/decrement
| * Notify instance binding data api of refcount increment/decrementIgnacio Etcheverry2018-08-231-4/+71
| |
* | Add print_verbose to print to stdout only in verbose modeRémi Verschelde2018-08-241-5/+1
| | | | | | | | | | | | Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);