I'm dynamically creating buttons and sprites in my Unity project (for reasons). I'm making a lot of them. I know that it doesn't matter on compiled code, but while I'm debugging my code in the unity editor, this creates a massive unsorted list of objects with similar names (I have named them for clarity, but there's a lot of similarity).
When I'm creating stuff in the editor, I'm able to group it into groups and subgroups for easy organization.
Is there a way to put the dynamically created objects into groups so that the unity editor will group them for easy browsing while I'm debugging? (Unity Level: Learning, C# Level: Experienced)
You can create an empty parent object before instantiating your buttons etc.
// This will create an empty GameObject.
var parentObj = new GameObject("Parent Object");
for(int i = 0; i < 10; i++)
Instantiate(prefab, transform.position, Quaternion.identity, parentObj.transform);