// DependencyWalker - display all directly/indirectly referenced assets in the active level. // Written by Martin Hoffesommer, http://hoffesommer.com // Released under the Beerware license: http://en.wikipedia.org/wiki/Beerware // // "THE BEER-WARE LICENSE" (Revision 42): // wrote this file. As long as you retain this notice you // can do whatever you want with this stuff. If we meet some day, and you think // this stuff is worth it, you can buy me a beer in return. using UnityEngine; using UnityEditor; using System; public class DependencyWalker: EditorWindow { string[] m_assets; Vector2 m_scrollPos; [MenuItem("Window/Dependency Walker")] static void Init() { EditorWindow.GetWindow(typeof(DependencyWalker)); } DependencyWalker() { string[] h=new string[1]; h[0]=EditorApplication.currentScene; m_assets=AssetDatabase.GetDependencies(h); Array.Sort(m_assets); } void OnGUI() { m_scrollPos=GUILayout.BeginScrollView(m_scrollPos); for (int k=0;k