protected override JobHandle OnUpdate(JobHandle inputDeps) { NativeArray <CharaMotion> charaMotions = m_query.ToComponentDataArray <CharaMotion>(Allocator.TempJob); NativeArray <CharaFlag> charaFlags = m_query.ToComponentDataArray <CharaFlag>(Allocator.TempJob); NativeArray <CharaQueue> charaQueues = m_query.ToComponentDataArray <CharaQueue>(Allocator.TempJob); NativeArray <CharaDash> charaDashes = m_query.ToComponentDataArray <CharaDash>(Allocator.TempJob); NativeArray <CharaDelta> charaDeltas = m_query.ToComponentDataArray <CharaDelta>(Allocator.TempJob); var job = new InputJob() { m_charaMotions = charaMotions, m_charaFlags = charaFlags, m_charaQueues = charaQueues, m_charaDashes = charaDashes, m_charaDeltas = charaDeltas, JumpSpeed = Settings.Instance.Move.JumpSpeed, }; inputDeps = job.Schedule(inputDeps); inputDeps.Complete(); m_query.CopyFromComponentDataArray(job.m_charaMotions); m_query.CopyFromComponentDataArray(job.m_charaFlags); m_query.CopyFromComponentDataArray(job.m_charaQueues); m_query.CopyFromComponentDataArray(job.m_charaDashes); m_query.CopyFromComponentDataArray(job.m_charaDeltas); charaMotions.Dispose(); charaFlags.Dispose(); charaQueues.Dispose(); charaDashes.Dispose(); charaDeltas.Dispose(); return(inputDeps); }
public override bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List <Issue> Issues) { // Make sure we're running a step that this applies to if (JobStep.Name.IndexOf("Copyright", StringComparison.OrdinalIgnoreCase) == -1) { return(false); } // Find any files in compiler output format HashSet <string> SourceFileNames = new HashSet <string>(StringComparer.OrdinalIgnoreCase); foreach (Match FileMatch in Regex.Matches(Diagnostic.Message, @"^\s*(?:WARNING|ERROR):\s*([^ ]+\.[a-zA-Z]+):", RegexOptions.Multiline)) { if (FileMatch.Success) { string SourceFileName = FileMatch.Groups[1].Value.Replace('\\', '/'); SourceFileNames.Add(SourceFileName); } } // If we found any source files, create a diagnostic category for them if (SourceFileNames.Count > 0) { Issue Issue = new Issue(Job.Project, Category, Job.Url, new IssueDiagnostic(JobStep.Name, JobStep.Url, Diagnostic.Message, Diagnostic.Url)); Issue.FileNames.UnionWith(SourceFileNames); Issues.Add(Issue); return(true); } // Otherwise pass return(false); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var iJob = new InputJob() { Vertical = UnityEngine.Input.GetAxis("Vertical"), Horizontal = UnityEngine.Input.GetAxis("Horizontal") }; return iJob.Schedule(this, inputDeps); }
protected override JobHandle OnUpdate(JobHandle inputDependencies) { var job = new InputJob() { Horizontal = Input.GetAxis("Horizontal"), Vertical = Input.GetAxis("Vertical") }; return(job.Schedule(this, inputDependencies)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new InputJob { Fire = (Input.GetMouseButtonDown(0)) ? 1 : 0, MousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition) }; return(job.Schedule(this, 1, inputDeps)); }
public override bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List <Issue> Issues) { string DefaultProject = String.Format("{0} (Unmatched)", Job.Project); Issue Issue = new Issue(DefaultProject, Category, Job.Url, new IssueDiagnostic(JobStep.Name, JobStep.Url, Diagnostic.Message, Diagnostic.Url)); Issue.Identifiers.Add(Diagnostic.Message); Issues.Add(Issue); return(true); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new InputJob() { m_charaMotions = m_group.GetComponentDataArray <CharaMotion>(), m_charaMukis = m_group.GetComponentDataArray <CharaMuki>(), m_padInputs = m_group.GetComponentDataArray <PadInput>(), }; inputDeps = job.Schedule(inputDeps); inputDeps.Complete(); return(inputDeps); }
public IssuesListener(string Stream, int Change, string JobName, string JobUrl, string JobStepName, string JobStepUrl, string LineUrl, string BaseDir, FileReference OutputFile) { this.OutputFile = OutputFile; this.LineUrl = LineUrl; JobStep = new InputJobStep(); JobStep.Name = JobStepName; JobStep.Url = JobStepUrl; JobStep.BaseDirectory = BaseDir; Job = new InputJob(); Job.Change = Change; Job.Stream = Stream; Job.Url = JobUrl; Job.Name = JobName; Job.Steps.Add(JobStep); }
public override bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List <Issue> Issues) { // Find a list of source files with errors HashSet <string> ErrorFileNames = new HashSet <string>(StringComparer.OrdinalIgnoreCase); foreach (Match FileMatch in Regex.Matches(Diagnostic.Message, @"^\s*((?:[A-Za-z]:)?[^\s(:]+)[\(:]\d[\s\d:\)]+(?:warning|error|fatal error)", RegexOptions.Multiline)) { if (FileMatch.Success) { string FileName = GetNormalizedFileName(FileMatch.Groups[1].Value, JobStep.BaseDirectory); if (SourceFileExtensions.Any(x => FileName.EndsWith(x, StringComparison.OrdinalIgnoreCase))) { ErrorFileNames.Add(FileName); } } } // Find any referenced files in compiler output format HashSet <string> ReferencedFileNames = new HashSet <string>(StringComparer.OrdinalIgnoreCase); foreach (Match FileMatch in Regex.Matches(Diagnostic.Message, @"^\s*(?:In file included from\s*)?((?:[A-Za-z]:)?[^\s(:]+)[\(:]\d", RegexOptions.Multiline)) { if (FileMatch.Success) { string FileName = GetNormalizedFileName(FileMatch.Groups[1].Value, JobStep.BaseDirectory); if (SourceFileExtensions.Any(x => FileName.EndsWith(x, StringComparison.OrdinalIgnoreCase))) { ReferencedFileNames.Add(FileName); } } } // If we found any source files, create a diagnostic category for them if (ReferencedFileNames.Count > 0) { Issue Issue = new Issue(Job.Project, Category, Job.Url, new IssueDiagnostic(JobStep.Name, JobStep.Url, ShortenPaths(Diagnostic.Message), Diagnostic.Url)); Issue.FileNames.UnionWith(ReferencedFileNames); Issue.Identifiers.UnionWith(GetSourceFileNames(ErrorFileNames)); Issues.Add(Issue); return(true); } // Otherwise pass return(false); }
public override bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List <Issue> Issues) { HashSet <string> FileNames = new HashSet <string>(); foreach (Match Match in Regex.Matches(Diagnostic.Message, @"^\s*[a-zA-Z0-9]+:\s+(?:Error:|Warning:)\s+(?:\[AssetLog\] )?((?:[a-zA-Z]:)?[^:]+(?:.uasset|.umap)):\s*(.*)")) { FileNames.Add(GetNormalizedFileName(Match.Groups[1].Value, JobStep.BaseDirectory)); } if (FileNames.Count > 0) { Issue Issue = new Issue(Job.Project, Category, Job.Url, new IssueDiagnostic(JobStep.Name, JobStep.Url, Diagnostic.Message, Diagnostic.Url)); Issue.FileNames.UnionWith(FileNames); Issues.Add(Issue); return(true); } return(false); }
// OnUpdate runs on the main thread. protected override JobHandle OnUpdate(JobHandle inputDependencies) { float3 position = InputUtil.GetPosition(); m_currentInputData.State = InputUtil.GetTouchState(); m_currentInputData.CurrentTime = Time.realtimeSinceStartup; m_currentInputData.DeltaTime = Time.deltaTime; m_currentInputData.DiffPosition = position.xy - m_currentInputData.ScreenPosition; m_currentInputData.Angle = math.atan2(m_currentInputData.DiffPosition.y, m_currentInputData.DiffPosition.x); m_currentInputData.ScreenPosition = position.xy; var job = new InputJob { Data = GetCurrentInputData(), }; return(job.Schedule(this, inputDependencies)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { NativeArray <CharaMuki> charaMukis = m_query.ToComponentDataArray <CharaMuki>(Allocator.TempJob); NativeArray <CharaFlag> charaFlags = m_query.ToComponentDataArray <CharaFlag>(Allocator.TempJob); NativeArray <PadScan> padScans = m_query.ToComponentDataArray <PadScan>(Allocator.TempJob); var job = new InputJob() { m_charaMukis = charaMukis, m_charaFlags = charaFlags, m_padScans = padScans, }; inputDeps = job.Schedule(inputDeps); inputDeps.Complete(); m_query.CopyFromComponentDataArray(job.m_charaMukis); charaMukis.Dispose(); charaFlags.Dispose(); padScans.Dispose(); return(inputDeps); }
public override bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List <Issue> Issues) { List <string> SymbolMatches = new List <string>(); // Mac link error: // Undefined symbols for architecture arm64: // "Foo::Bar() const", referenced from: if (Regex.IsMatch(Diagnostic.Message, "^Undefined symbols")) { foreach (string Line in Diagnostic.Message.Split('\n')) { Match SymbolMatch = Regex.Match(Line, "^ \"(.+)\""); if (SymbolMatch.Success) { SymbolMatches.Add(SymbolMatch.Groups[1].Value); } } } // Android link error: // Foo.o:(.data.rel.ro + 0x5d88): undefined reference to `Foo::Bar()' Match UndefinedReference = Regex.Match(Diagnostic.Message, ": undefined reference to [`']([^`']+)"); if (UndefinedReference.Success) { SymbolMatches.Add(UndefinedReference.Groups[1].Value); } // LLD link error: // ld.lld.exe: error: undefined symbol: Foo::Bar() const Match LldMatch = Regex.Match(Diagnostic.Message, "error: undefined symbol:\\s*(.+)"); if (LldMatch.Success) { SymbolMatches.Add(LldMatch.Groups[1].Value); } // Link error: // Link: error: L0039: reference to undefined symbol `Foo::Bar() const' in file Match LinkMatch = Regex.Match(Diagnostic.Message, ": reference to undefined symbol [`']([^`']+)"); if (LinkMatch.Success) { SymbolMatches.Add(LinkMatch.Groups[1].Value); } // Microsoft linker error: // Foo.cpp.obj : error LNK2001: unresolved external symbol \"private: virtual void __cdecl UAssetManager::InitializeAssetBundlesFromMetadata_Recursive(class UStruct const *,void const *,struct FAssetBundleData &,class FName,class TSet<void const *,struct DefaultKeyFuncs<void const *,0>,class FDefaultSetAllocator> &)const \" (?InitializeAssetBundlesFromMetadata_Recursive@UAssetManager@@EEBAXPEBVUStruct@@PEBXAEAUFAssetBundleData@@VFName@@AEAV?$TSet@PEBXU?$DefaultKeyFuncs@PEBX$0A@@@VFDefaultSetAllocator@@@@@Z)", Match MicrosoftMatch = Regex.Match(Diagnostic.Message, ": unresolved external symbol \"([^\"]*)\""); if (MicrosoftMatch.Success) { SymbolMatches.Add(MicrosoftMatch.Groups[1].Value); } // Clean up all the symbol names SortedSet <string> SymbolNames = new SortedSet <string>(StringComparer.Ordinal); foreach (string SymbolMatch in SymbolMatches) { string SymbolName = SymbolMatch; // Remove any __declspec qualifiers SymbolName = Regex.Replace(SymbolName, "(?<![^a-zA-Z_])__declspec\\([^\\)]+\\)", ""); // Remove any argument lists for functions (anything after the first paren) SymbolName = Regex.Replace(SymbolName, "\\(.*$", ""); // Remove any decorators and type information (greedy match up to the last space) SymbolName = Regex.Replace(SymbolName, "^.* ", ""); // Add it to the list SymbolNames.Add(SymbolName); } // If we found any symbol names, create a fingerprint for them if (SymbolNames.Count > 0) { Issue Issue = new Issue(Job.Project, Category, Job.Url, new IssueDiagnostic(JobStep.Name, JobStep.Url, Diagnostic.Message, Diagnostic.Url)); Issue.Identifiers.UnionWith(SymbolNames); Issues.Add(Issue); return(true); } // Otherwise pass return(false); }