C#: Make internal properties and property accessors public (but hidden)

Instead of making the accessors `internal` which can break binary compat, make them `public` but hide them with EB never so they don't show up in IntelliSense.

Also, do the same for properties with the `PROPERTY_USAGE_INTERNAL` flag. These properties were not meant to be exposed to scripting, but since they've been public before all we can do now is hide them.
This commit is contained in:
Raul Santos
2024-03-29 02:14:58 +01:00
parent 29b3d9e9e5
commit 7d08e8727b
2 changed files with 34 additions and 8 deletions
+16
View File
@@ -88,6 +88,14 @@ class BindingsGenerator {
StringName setter;
StringName getter;
/**
* Determines if the property will be hidden with the [EditorBrowsable(EditorBrowsableState.Never)]
* attribute.
* We do this for propertyies that have the PROPERTY_USAGE_INTERNAL flag, because they are not meant
* to be exposed to scripting but we can't remove them to prevent breaking compatibility.
*/
bool is_hidden = false;
const DocData::PropertyDoc *prop_doc;
bool is_deprecated = false;
@@ -179,6 +187,14 @@ class BindingsGenerator {
*/
bool is_internal = false;
/**
* Determines if the method will be hidden with the [EditorBrowsable(EditorBrowsableState.Never)]
* attribute.
* We do this for methods that we don't want to expose but need to be public to prevent breaking
* compat (i.e: methods with 'is_compat' set to true.)
*/
bool is_hidden = false;
/**
* Determines if the method is a compatibility method added to avoid breaking binary compatibility.
* These methods will be generated but hidden and are considered deprecated.