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

auto-compile being skipped every time #8

Open
gusdleon opened this issue Aug 30, 2022 · 2 comments
Open

auto-compile being skipped every time #8

gusdleon opened this issue Aug 30, 2022 · 2 comments

Comments

@gusdleon
Copy link
Contributor

I'm having a issue importing assets since about a month, getting the error
The Asset system didn't catch asset quickly enough - skipping auto-compile for asset '{quixelAsset.Name}'

And getting a warning in the error list of sandbox (and visual studio) about the async task ImportFrom not having an await operator

I solved both problems inserting a await Task.Delay(500); below the line 44 of this file

// Locate imported s&box asset
var engineAsset = Tools.AssetSystem.All.FirstOrDefault( x => x.Path.NormalizeFilename() == mdlPath.NormalizeFilename() );
if ( engineAsset == null )
{
Log.Info( $"Asset system didn't catch asset quickly enough - skipping auto-compile for asset '{quixelAsset.Name}'" );
}
else
{
// Force a full compile
engineAsset.Compile( true );

but didn't created a PR before because I don't feel that's the correct approach to that problem.

what do you think?

@xezno
Copy link
Owner

xezno commented Aug 31, 2022

Yeah the s&box asset system propagates changes really slowly.. I don't think there's any events either for it unfortunately. It might be worth me asking for some and then just hooking this up to those.

Not having auto-compile isn't a huge deal right now so it's not worth hacking around.. assets will compile whenever they're needed, this is just a convenience thing for people importing lots of assets at once

@xezno
Copy link
Owner

xezno commented Sep 2, 2022

Just found out "assetsystem.changes" exists while I was doing something completely unrelated, it's undocumented for whatever reason, I'll have a look into using that

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

No branches or pull requests

2 participants