Exemple #1
0
        private void Clear()
        {
            _selectedObjects = null;
            _service         = null;

            EditorUtility.UnloadUnusedAssetsImmediate();
        }
Exemple #2
0
        private void Start()
        {
            if (_service == null)
            {
                _service = new SelectedAssetsAnalysisHelper();
            }

            Show();

            var startTime = Time.realtimeSinceStartup;

            _selectedObjects = Selection.objects;

            _lastResults = _service.GetReferences(_selectedObjects);

            EditorUtility.DisplayProgressBar("DependenciesHunter", "Preparing Assets", 1f);
            EditorUtility.UnloadUnusedAssetsImmediate();
            EditorUtility.ClearProgressBar();

            _workTime = Time.realtimeSinceStartup - startTime;
            _selectedObjectsFoldouts = new bool[_selectedObjects.Length];
            if (_selectedObjectsFoldouts.Length == 1)
            {
                _selectedObjectsFoldouts[0] = true;
            }

            _foldoutsScrolls = new Vector2[_selectedObjectsFoldouts.Length];
        }