Comments (3)
- See #90487.
This is intentional, the inspector only supports global classes. Previously in GDScript there was an inconsistency between SCRIPT
and CLASS
datatypes.
Also, it's documented:
Note: Custom resources and nodes must be registered as global classes using class_name.
Alternatively, we could use a native class instead, if the script is not a global class.
from godot.
I confirm that the following change fixes the issue for the Scatter plugin:
diff --git a/addons/proton_scatter/src/modifiers/base_modifier.gd b/addons/proton_scatter/src/modifiers/base_modifier.gd
index 244d465..3c30edb 100644
--- a/addons/proton_scatter/src/modifiers/base_modifier.gd
+++ b/addons/proton_scatter/src/modifiers/base_modifier.gd
@@ -1,4 +1,5 @@
@tool
+class_name BaseModifier
extends Resource
# Modifiers place transforms. They create, edit or remove transforms in a list,
diff --git a/addons/proton_scatter/src/stack/modifier_stack.gd b/addons/proton_scatter/src/stack/modifier_stack.gd
index 3b46123..65c2afe 100644
--- a/addons/proton_scatter/src/stack/modifier_stack.gd
+++ b/addons/proton_scatter/src/stack/modifier_stack.gd
@@ -9,7 +9,6 @@ signal transforms_ready
const ProtonScatter := preload("../scatter.gd")
const TransformList := preload("../common/transform_list.gd")
-const BaseModifier := preload("../modifiers/base_modifier.gd")
@export var stack: Array[BaseModifier] = []
There main problem I see is that plugins tend to avoid using class_name
to avoid polluting the game's namespace with plugin-internal classes. I suppose this is why @HungryProton used preload
s for these instead of class_name
.
I suspect we'll find more addons with similar broken compatibility with 4.3 after this change. I'm not sure telling all the plugin authors to use class_name
instead will be a satisfactory option for all.
For example @shakesoda already mentioned that the Spatial Gardener plugin seems to have the same issue.
from godot.
If there were a way to tell Godot that a class is not meant to be exposed to the end user, I'd be more than happy to use global class names everywhere.
I avoid class_names for nodes because I don't want them to show up in the Create new node
window unless the plugin is actually enabled (otherwise these nodes don't work properly).
This one is an exported resource so I guess I can make the fix on my end.
from godot.
Related Issues (20)
- Serialization Methods `var_to_bytes_with_objects` and `bytes_to_var_with_objects` Not Preserving Instance Property Values HOT 4
- Converting large float to string doesn't work
- Geometry gets strongly visually modified (simplified) when Camera3D's x frustum_offset is decreased below a certain negative number
- AStarGrid2D allow_partial_path does not always find the shortest path HOT 2
- `RenderingDevice.buffer_get_data` has very high latency HOT 2
- When inheriting `EditorSceneFormatImporter`, cannot call the parent class' virtual function "_import_scene()" because it hasn't been defined HOT 4
- Root Motion Track setting from script from instantiated scene HOT 6
- Custom SVG icon appears too large in Quick Open (Ctrl+P)
- Due to malformed Mach-o file, cannot run Godot app on Apple Silicon Mac HOT 2
- Normal values gets changed even when using `skip_vertex_transform` render_mode HOT 6
- Callable argument conversion error: Cannot convert argument 1 from int to int. HOT 2
- Signal tooltip doesn't go away when moving mouse to another signal in single window mode HOT 4
- RichTextLabel's "fade" offsets from start of string rather than start of command
- libc++abi: mutex lock failed editor crash HOT 1
- [Core] `Array` and `Dictionary` read only behavior is unsafe HOT 10
- JavaScriptObject example code doesn't work
- Adding a translation CSV results in errors on initial import for many types of resources HOT 5
- Meshes with a negative scale have incorrect normals when using `cull_disabled` and `cull_front` render modes HOT 1
- Landscape and Reverse Landscape orientation in iOS are in opposite direction that they are in Android
- 2D Camera viewport rounding error with subpixel position of 0.5 with "Snap 2D Transforms to Pixel" enabled HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.