Skip to content

Instantly share code, notes, and snippets.

@kimsama
kimsama / Unity-GetAllFilesUnderSelectedFoder.cs
Last active May 8, 2024 20:22
Code snip which shows gather all files under selected folder in Unity's Project View
/// <summary>
/// Retrieves selected folder on Project view.
/// </summary>
/// <returns></returns>
public static string GetSelectedPathOrFallback()
{
string path = "Assets";
foreach (UnityEngine.Object obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets))
{