summaryrefslogtreecommitdiff
path: root/modules/mono/csharp_script.cpp
AgeCommit message (Collapse)Author
2019-04-29C#: Support resource type hint in exported arraysIgnacio Etcheverry
- Elements of types like PackedScene will display with the special editor for such type.
2019-04-29Merge pull request #28423 from ↵Rémi Verschelde
neikeq/dont-forget-to-think-a-name-for-this-branch C#: Deprecate accessor methods and generate correct int and float types
2019-04-26Mono: Lazily load scripts metadata fileIgnacio Etcheverry
- 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.
2019-04-25C# bindings generator cleanupIgnacio Etcheverry
- Normal log messages are no longer warnings. - BindingsGenerator is no longer a singleton. - Added a log function.
2019-04-12Merge pull request #27950 from Nonnu42/contribIgnacio Roldán Etcheverry
Fixes #17233 allowing C# to override _GetPropertyList
2019-04-12Fixes #17233 allowing C# to override _GetPropertyListNuno Cardoso
2019-04-06C#: Support type hints for exported ArraysIgnacio Etcheverry
Added the code for Dictionary as well, but it's not yet supported by the Godot inspector.
2019-04-06C#: Add marshalling support for IEnumerable and IDictionaryIgnacio Etcheverry
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>.
2019-04-04Mono: Make missing default constructor error more foolproofForLoveOfCats
2019-03-13C#: Update exports only in the editorIgnacio Etcheverry
2019-03-08Fix CSharpInstance::set not working with base classesIgnacio Etcheverry
2019-03-07Merge pull request #26773 from neikeq/issue-26628Rémi Verschelde
Mono: Fix crash with exported field of custom Reference derived type
2019-03-07Mono: Fix crash with exported field of custom Reference derived typeIgnacio Etcheverry
2019-03-07Mono: Partially implement some Godot debug api functionsIgnacio Etcheverry
Debug breaks sent with debug_break and debug_break_parse should display correctly in the Godot debugger now.
2019-03-07Merge pull request #26765 from neikeq/issue-25959Ignacio Etcheverry
Mono: Fix crash when re-using script binding after domain reloading
2019-03-07Mono: Fix crash when re-using script binding after domain reloadingIgnacio Etcheverry
2019-03-07Update scripts exports even when normal script instances are created to ↵Sebastian Hartte
better support tool scripts with exported variables.
2019-02-28Mono: Fail on script instance creation if constructor was not foundIgnacio Etcheverry
Previously this would result in NULL dereferencing. Now we fail with an error.
2019-02-27Fix -Wsign-compare warnings.marxin
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-09Use script instance binding for objects constructed from C#Ignacio Etcheverry
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.
2019-02-03Mono: Lifetime fixes for CSharpInstance and instance binding dataIgnacio Etcheverry
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.
2019-02-03Mono: CleanupIgnacio Etcheverry
2019-01-22Mono: Fix hot reload build errors and cleanupIgnacio Etcheverry
2019-01-21Mono: Add assembly reloading to running gamesIgnacio Etcheverry
Add environment variable to specify a custom --debugger-agent for mono.
2019-01-17C#: Fix crash due to missing gchandle ref null checkIgnacio Etcheverry
2019-01-10Merge pull request #24877 from neikeq/issue-24280Rémi Verschelde
Fix properties being lost when reloading placeholder GDScript instance
2019-01-10Fix properties being lost when reloading placeholder GDScript instanceIgnacio Etcheverry
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).
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-08Tweaks after feedbackBen Rog-Wilhelm
2018-12-07Implement CSharpScript::get_script_method_list and related functionality.Ben Rog-Wilhelm
2018-12-01Fix crash due to ~CSharpInstance() being called on freed instanceIgnacio Etcheverry
This would be the case when calling SetScript on an object with a C# script.
2018-11-30Implement CSharpScript::is_valid()Ignacio Etcheverry
2018-11-30Merge pull request #24091 from neikeq/iiIgnacio Etcheverry
C#: Improve tool script support and fix reloading issues
2018-11-30C#: Improve tool script support and fix reloading issuesIgnacio Etcheverry
2018-11-27Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky
tools), fixes #17070
2018-11-08Improve the C# API projects generationIgnacio Etcheverry
- 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>'
2018-10-25Merge pull request #23162 from neikeq/ccIgnacio Etcheverry
Proper support for namespaces and other enhancement/fixes
2018-10-25Parse C# script namespace and classIgnacio Etcheverry
- Added a very simple parser that can extract the namespace and class name of a C# script.
2018-10-25C#: Fix crash when disposing Reference on domain finalizeIgnacio Etcheverry
2018-10-06Remove redundant "== false" codeAaron Franke
Some of this code has been re-organized. f
2018-10-06Remove redundant "== true" codeAaron Franke
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-09-27Mono: Fix not creating generic Array or Dictionary where expectedIgnacio Etcheverry
2018-09-15Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli
NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
2018-09-15Rename slave keyword to puppetFabio Alessandrelli
The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
2018-09-12Mono: Fix build regression due to wrong return typeIgnacio Etcheverry
2018-09-12C#: Fix explicit enum values when exporting memberIgnacio Etcheverry
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
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.
2018-09-12Fix/workaround for issue #21667Ignacio Etcheverry
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).
2018-09-12Cleanup of c# api files and bindings generatorIgnacio Etcheverry
- 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.