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 Mono build after resource load cache changes #45959

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

Xartorx
Copy link
Contributor

@Xartorx Xartorx commented Feb 13, 2021

Fixes Mono build after resource load cache changes (#45903)

@@ -2,7 +2,7 @@ namespace Godot
{
public static partial class ResourceLoader
{
public static T Load<T>(string path, string typeHint = null, bool noCache = false) where T : class
public static T Load<T>(string path, string typeHint = null, ResourceLoader.CacheMode noCache = (ResourceLoader.CacheMode)1) where T : class
Copy link
Member

@akien-mga akien-mga Feb 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with Mono bindings, but can't this use the actual enum value instead of casting 1? The whole point of enums is to avoid hardcoding magic numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied it from ResourceLoader that was generated by the engine (which mismatch with extension class caused an error). But yeah, probably a good idea to change it to actual enum.

@Xartorx Xartorx force-pushed the fix-mono-load-cache branch from 9d08438 to 8e1da2e Compare February 13, 2021 19:14
@akien-mga akien-mga merged commit 4c0d889 into godotengine:master Feb 13, 2021
@akien-mga
Copy link
Member

Thanks!

@Xartorx Xartorx deleted the fix-mono-load-cache branch February 13, 2021 21:34
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.

3 participants