Improve the usability of Result<T, E> and add new job schedule method to EntityQuery.

Added implicate conversion to Result<T, E> and RefResult<T, E>;
Added new ScheduleChunkParallel in EntityQuery;
Remove Ghost.SparseEntity from solution file. It's now completlty replaced by Ghost.Entities;
This commit is contained in:
2025-12-09 21:43:12 +09:00
parent 97d1118caa
commit 99c1a1980e
29 changed files with 646 additions and 553 deletions

View File

@@ -101,17 +101,17 @@ public class Shader : IResourceReleasable, IIdentifierType
return ref _passes[index];
}
public RefResult<ShaderPass, ResultStatus> TryGetPassKey(string passName, out int passIndex)
public RefResult<ShaderPass, ErrorStatus> TryGetPassKey(string passName, out int passIndex)
{
var index = _passLookup.GetValueOrDefault(passName, -1);
if (index == -1)
{
passIndex = -1;
return Result.CreateRef(ref Unsafe.NullRef<ShaderPass>(), ResultStatus.NotFound);
return ErrorStatus.NotFound;
}
passIndex = index;
return Result.CreateRef(ref _passes[index], ResultStatus.Success);
return RefResult<ShaderPass, ErrorStatus>.Success(ref _passes[index]);
}
void IResourceReleasable.ReleaseResource(IResourceDatabase database)