Skip to content
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

Fix create c# script from editor after partial class type is necessary #46968

Merged
merged 1 commit into from
Mar 13, 2021
Merged

Fix create c# script from editor after partial class type is necessary #46968

merged 1 commit into from
Mar 13, 2021

Conversation

kalysti
Copy link
Contributor

@kalysti kalysti commented Mar 13, 2021

This fix is adding the partial class keyword to new scripts generated by the editor or by the plugin creator since partial class type is required for mono scripts.

image
image

@kalysti kalysti requested a review from a team as a code owner March 13, 2021 16:37
@Chaosus Chaosus added this to the 4.0 milestone Mar 13, 2021
@akien-mga
Copy link
Member

I'm not familiar with C# specifics but I've never heard that the partial keyword was necessary, and I've been testing many projects which worked fine without it.

Could you clarify what bug you're fixing exactly?

@kalysti
Copy link
Contributor Author

kalysti commented Mar 13, 2021

Download the master branch. Create a c# script. Build it. U will get the following error:
image

II'm not sure since when they was change it. But i think it comes from:
#46713

Anyway, partial type is now required.

@neikeq
Copy link
Contributor

neikeq commented Mar 13, 2021

Yes, this is required now that we use source generators in latest master (it's not needed in 3.2). I forgot about the script template...

@akien-mga akien-mga merged commit 1066dbc into godotengine:master Mar 13, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants