mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Reprocess, load and hot swap changed assets using new asset pipeline
This commit is contained in:
@@ -30,7 +30,7 @@ namespace GlitchyEngine
|
||||
|
||||
private IContentManager _contentManager;
|
||||
|
||||
private append List<delegate void()> _jobQueue = .() ~ ClearAndDeleteItems!(_);
|
||||
private append List<delegate bool()> _jobQueue = .() ~ ClearAndDeleteItems!(_);
|
||||
private append Monitor _jobQueueMutex = .();
|
||||
|
||||
public bool IsRunning => _running;
|
||||
@@ -233,7 +233,7 @@ namespace GlitchyEngine
|
||||
}
|
||||
|
||||
/// Executes the given Job on the main thread. Takes ownership of the delegate.
|
||||
public void InvokeOnMainThread(delegate void() ownJob)
|
||||
public void InvokeOnMainThread(delegate bool() ownJob)
|
||||
{
|
||||
using (_jobQueueMutex.Enter())
|
||||
{
|
||||
@@ -249,10 +249,14 @@ namespace GlitchyEngine
|
||||
{
|
||||
for (let job in _jobQueue)
|
||||
{
|
||||
job();
|
||||
if (job())
|
||||
{
|
||||
@job.RemoveFast();
|
||||
delete job;
|
||||
}
|
||||
}
|
||||
|
||||
ClearAndDeleteItems!(_jobQueue);
|
||||
//ClearAndDeleteItems!(_jobQueue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using Bon;
|
||||
|
||||
namespace GlitchyEngine.Content;
|
||||
|
||||
[BonTarget]
|
||||
enum AssetCompression : uint8
|
||||
{
|
||||
None,
|
||||
L4Z
|
||||
LZ4
|
||||
}
|
||||
|
||||
@@ -257,6 +257,8 @@ static class ScriptEngine
|
||||
|
||||
_requestingReload = false;
|
||||
_userAssemblyWatcher.StartRaisingEvents();
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user