MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / compileGameScriptsAsync

Method compileGameScriptsAsync

Source/Editor/Scripting/ScriptsBuilder.cpp:526–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526bool ScriptsBuilderImpl::compileGameScriptsAsync()
527{
528 PROFILE_MEM(Editor);
529
530 // Start
531 {
532 ScopeLock scopeLock(_locker);
533
534 _isCompileRequested = false;
535 _lastCompileAction = DateTime::Now();
536 _compilationsCount++;
537 _isCompileRunning = true;
538
539 ScriptsBuilderServiceInstance.Init();
540
541 CallEvent(EventType::CompileBegin);
542 }
543
544 // Do work
545 const bool success = !compileGameScriptsAsyncInner();
546
547 // End
548 {
549 ScopeLock scopeLock(_locker);
550
551 _lastCompilationFailed = !success;
552
553 ScriptsBuilder::OnCompilationEnd(success);
554 if (success)
555 ScriptsBuilder::OnCompilationSuccess();
556 else
557 ScriptsBuilder::OnCompilationFailed();
558 if (success)
559 CallEvent(EventType::CompileEndGood);
560 else
561 CallEvent(EventType::CompileEndFailed);
562 _isCompileRunning = false;
563 }
564
565 return false;
566}
567
568bool ScriptsBuilderService::Init()
569{

Callers

nothing calls this directly

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected