Skip to content

Instantly share code, notes, and snippets.

@kimsama
kimsama / Unity-GetAllFilesUnderSelectedFoder.cs
Last active August 22, 2024 06:28
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))
{