public void Reset() { EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); mockMesher = new MockMesher(mockGetComponent); mockMesher.CullFaces = true;//by default mesher is dependent on neighbour, as only the naive mesher is not mockProvider = new MockProvider(); mockComponentStorage = new Dictionary <Vector3Int, MockChunkComponent>(); mockPlayChunkID = Vector3Int.zero; mockLightManager = Substitute.For <ILightManager>(); mockLightManager.CreateGenerationJob(Arg.Any <Vector3Int>()) .Returns(args => { return(new BasicFunctionJob <LightmapGenerationJobResult>(() => new LightmapGenerationJobResult())); }); mockManager = Substitute.For <IChunkManager>(); mockManager.GetChunkComponent(Arg.Any <Vector3Int>()) .Returns(args => { var chunkId = (Vector3Int)args[0]; return(mockGetComponent(chunkId)); }); mockManager.GetManhattanDistanceFromPlayer(Arg.Any <Vector3Int>()) .Returns(args => { var chunkId = (Vector3Int)args[0]; return(MockGetPriorityOfChunk(chunkId)); }); worldLimits = new WorldSizeLimits(false, 0); worldLimits.Initalise(); mockManager.WorldLimits.Returns(worldLimits); }
protected override AbstractPipelineJob <LightmapGenerationJobResult> MakeJob(Vector3Int chunkId) { return(lightManager.CreateGenerationJob(chunkId)); }
public AbstractPipelineJob <LightmapGenerationJobResult> CreateGenerationJob(Vector3Int chunkId) { return(lightManager.CreateGenerationJob(chunkId)); }