Skip to content

Properties not showing up in the Godot editor #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
atrefonas opened this issue Mar 5, 2023 · 5 comments
Closed

Properties not showing up in the Godot editor #144

atrefonas opened this issue Mar 5, 2023 · 5 comments
Labels
question Not a problem with the library, but a question regarding usage.

Comments

@atrefonas
Copy link

When I add this code with the #[property] macro, I'm not seeing the property show up in the Godot editor in the sidebar:

#[derive(GodotClass)]
#[class(base=CharacterBody3D)]
pub struct Player3D {
    #[property]
    speed: f32,

I tried this on 2 different classes and don't see it working on either. Is it currently supported?

@Bromeon
Copy link
Member

Bromeon commented Mar 5, 2023

So you tried a random syntax that's nowhere documented and file an issue because it doesn't work? 😉
This is not the gdnative project, the API is completely different. We have a very early-stage #[export] macro, but it will be reworked to its core, so I wouldn't build too much on it.

This is the second time within a few hours that you ask something, which can be found very quickly through publicly available documentation. I also put a lot of effort into a keeping a current overview in #24, and would appreciate if people take the time to have at least a look at it.

I would recommend you join our Discord, we have a dedicated #help-gdextension channel, where lots of people can guide you towards a solution. Not only would this keep the issue tracker focused on confirmed issues, but you will also get much quicker answers, since a lot of people are active across different time zones. Sounds good? 🙂

@Bromeon Bromeon added the question Not a problem with the library, but a question regarding usage. label Mar 5, 2023
@atrefonas
Copy link
Author

Hello, thanks for getting back quickly for this and the other issue.

I do not see where it is in the documentation, after having looked for it. I haven't studied the entire source code so I presume it is in there somewhere? I don't see it mentioned in this Github repository, and the GD Rust book doesn't go over this for gdextension. Is there another documentation source I'm not aware of?

Also I would love to join the Discord channel, but I am not sure how to access it. I have already joined the #gdnative-dev channel in the Godot Engine discord. I guess there must be a particular Discord server for Godot Rust? It would also be good to make that more visible and easier to get to (unless I have a blindspot and simply don't see the link).

I have been thoroughly enjoying using Godot and gdextension recently so I am sure I will have many more questions 😄.

By the way I have been looking through the source and was able to fix some of my own problems. I also made some good progress after setting up the lldb debugger (sidenote - would be nice if this was documented in the Godot Rust book).

@atrefonas
Copy link
Author

atrefonas commented Mar 5, 2023

Ah ok - I see the Discord link now in the Readme. Somehow I missed that even after specifically looking for it! Maybe it could have a Discord icon as well or its own section.

@Bromeon
Copy link
Member

Bromeon commented Mar 5, 2023

Is there another documentation source I'm not aware of?

Yes, cargo doc, but you need to run it locally at the moment. To discover concrete APIs, it's the best we have at the moment.

I want to host it online just like the gdnative one, but it's quite a bit of infrastructure effort, for which I haven't had the time yet. And we don't have crates.io releases yet, either.

@atrefonas
Copy link
Author

Is there another documentation source I'm not aware of?

Yes, cargo doc, but you need to run it locally at the moment. To discover concrete APIs, it's the best we have at the moment.

Awesome, didn't realize that was a thing!

@Bromeon Bromeon closed this as completed Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Not a problem with the library, but a question regarding usage.
Projects
None yet
Development

No branches or pull requests

2 participants