private void UpdateForPaint(Vector3 wpos) { reticleSpherical.EnableRenderer(true); reticleSpherical.SetPositionAndSize(wpos, BrushSize); if (clicking && Terrain.OperationsManager.IsReadyToComputeAsync && voxelType != null) { Terrain.OperationsManager .Add(Paint.CreateFromUnityWorld(Terrain, wpos, BrushSize, voxelType), true) .PerformAll(asyncOperations); } }
protected virtual IOperation CreateOperationFromEditor(Vector3 worldPosition, TerrainToolEditor editor) { var voxelType = EditorUtils.GetVoxelTypeFromIndex(VoxelTypeIndex, editor.Terrain.VoxelTypeSet); return(Paint.CreateFromUnityWorld(editor.Terrain, worldPosition, Radius, voxelType)); }