Exemplo n.º 1
0
        private void CreateEntityListView()
        {
            entityListView?.Dispose();

            entityListView = new EntityListView(
                entityListState,
                EntityListQuerySelection,
                x => SetEntitySelection(x, false),
                () => SystemSelectionWorld ?? WorldSelection,
                () => SystemSelection,
                x => chunkInfoListView.SetChunkArray(x)
                );
        }
Exemplo n.º 2
0
        private void ChunkInfoView()
        {
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            ChunkInfoToggle();
            GUILayout.EndHorizontal();
            var chunkArray = entityListView.ChunkArray;

            if (chunkArray.IsCreated && entityListView.ShowingSomething)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label($"Matching chunks: {chunkArray.Length}");
                GUILayout.FlexibleSpace();
                if (chunkInfoListView.HasSelection() && GUILayout.Button("Clear Selection"))
                {
                    chunkInfoListView.ClearSelection();
                    EditorGUIUtility.ExitGUI();
                }
                GUILayout.EndHorizontal();
                chunkInfoListView.SetChunkArray(chunkArray);
                chunkInfoListView.OnGUI(GUIHelpers.GetExpandingRect());
            }
        }