Comments (4)
As I understood, there are two things:
- A feature request/discussion whether
@export_file("*.filter")
could potentially be allowed onArray
-- visualized as a list in UI. - If not: the question whether the error message "@export_file" requires a variable of type "String" but type "XY" was given instead is exclusive to the GDScript parser, or it can/could also be used for GDExtension properties.
On Rust side, we should in parallel make sure that the property is registered properly with Godot.
from godot.
i dont think this is a godot issue? isn't this just an issue with the rust bindings? im not sure what godot could do here.
from godot.
2. If not: the question whether the error message "@export_file" requires a variable of type "String" but type "XY" was given instead is exclusive to the GDScript parser, or it can/could also be used for GDExtension properties.
Currently, this message comes from gdscript_parser.cpp
.
I suppose we could put similar validation in ClassDB::add_property()
, however, the error message couldn't really be as good.
From Godot's perspective, it's looking at data passed on the PropertyInfo
struct, and the error message could only refer to that (for example, saying the PropertyInfo::hint
won't work with the given PropertyInfo::type
). However, the binding probably doesn't directly expose PropertyInfo
, but instead some binding-specific way of doing it, and so it'd be able to provide a better error message that refers to that.
So, I personally think giving a nice error message should be up to the GDExtension binding (in this case, the Rust binding).
from godot.
Discussed at the GDExtension meeting:
- It would be nice to have an API that that could check if a property is valid, that could potentially be used by GDScript,
ClassDB
and GDExtension bindings, and still provide nice error messages. - However, some bindings may be able to check for property validity at compile time (making this unnecessary)
- The property hints have decent documentation but we'd need to make sure it's complete and stays that way.
- We'd also need to ensure that the potential future validation API would remain in sync.
- For now, we recommend that GDExtension bindings attempt to handle this validation themselves, based on the documentation linked above.
from godot.
Related Issues (20)
- Godot 4.3 compiling for windows python error (on windows) HOT 2
- Light2Ds do not affect CanvasItems that are inside their same CanvasLayer HOT 1
- Black screen frozen and console with infinite errors when launching edit project HOT 1
- Exported Vars: Cannot clear item from array when hint is Array[Node] HOT 1
- A missing project still displays an invalid timestamp in the Project Manager HOT 2
- Compatibility renderer 3D MSAA not working on MacOS HOT 1
- Changing UV via shader breaks on OpenGL via Angle on Windows HOT 2
- Scattering setting vanishes from TileMap Editor if another tool is selected
- [Windows] Unable to select drive in project manager import dialog HOT 1
- ProgressBar Borders do not skew with the rest of the Fill
- Crash whenever the signature of a static method on a class_name class with no extends can be compiled HOT 5
- Vulkan error stops Godot 4.3 editor from starting HOT 6
- C# Editor Plugin crashes Godot 4.3 when GraphNode is added to GraphEdit HOT 4
- Compilation failure when cross-compiling for RISC-V HOT 3
- Screen not clearing in transparent background
- ProjectSettings.load_resource_pack is completely useless / broken and DESPERATELY needs a rewrite / multiple fixes HOT 6
- [Dotnet]Exporting a project in c# after switching aot can be problematic
- New Vulkan errors in Godot 4.3 when rendering Billboard enabled AnimatedSprite3D on specific Android device HOT 1
- Unable to modify/create compute shader code during runtime HOT 3
- Editor cannot assign custom node to member in C# script when using [Tool] annotation HOT 2
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.