Editor layout

- Cleanup the editors a bit
- Editor foldout scope
- Cell size to editor (this is user preference data, could be put in EditorPrefs later)
This commit is contained in:
max
2023-07-09 23:01:48 +02:00
parent ddf71ef7d7
commit 8b44c33813
6 changed files with 126 additions and 92 deletions

View File

@ -5,15 +5,12 @@ namespace VertexColor.ScenePartition
[System.Serializable]
public class SceneGrid
{
[SerializeField]
public int cellSize = 10;
[SerializeField]
private SceneGridDictionary grid = new SceneGridDictionary();
public SceneGridDictionary Grid => grid;
public void Insert(ulong scenePartitionId, Vector3 point)
public void Insert(ulong scenePartitionId, Vector3 point, int cellSize)
{
int gridId = CalculateGridPosition(point, cellSize);
if (grid.TryGetValue(gridId, out GridList ids))