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

Skip AssetPostProcessor when file in StreamingAssets folder. #166 #171

Merged
merged 1 commit into from
Feb 4, 2019

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Feb 4, 2019

No description provided.

return false;
}

return FullPath[Application.streamingAssetsPath.Length] == '/';
Copy link
Contributor

Choose a reason for hiding this comment

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

This code may raise a IndexOutOfRangeException. For example, UnityPath.FromUnityPath(Application.streamingAssetsPath).IsStreamingAsset will be an edge case.

Copy link
Contributor

Choose a reason for hiding this comment

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

How about a suggestion for a solution on line 56?

return false;
}

if (!FullPath.StartsWith(Application.streamingAssetsPath))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!FullPath.StartsWith(Application.streamingAssetsPath))
return FullPath.StartsWith(Application.streamingAssetsPath+"/");

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 avoid string +, but this one is safer

@yutopp yutopp added this to the v0.50 milestone Feb 4, 2019
@yutopp
Copy link
Contributor

yutopp commented Feb 4, 2019

This change resolves #166.

@ousttrue ousttrue force-pushed the skip_import_in_streamingassets branch from f89bfea to cb91f66 Compare February 4, 2019 15:48
@ousttrue
Copy link
Contributor Author

ousttrue commented Feb 4, 2019

I rewrote.

Copy link
Contributor

@yutopp yutopp left a comment

Choose a reason for hiding this comment

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

thx! LGTM.

@ousttrue ousttrue merged commit 99a150a into master Feb 4, 2019
@yutopp yutopp deleted the skip_import_in_streamingassets branch March 6, 2019 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants