In editor you can add [Header("Header")] above some variable and gives it distinct spacing and header. Is there a way to make it like that but that it collapses a section. I have PLENTY of variables and dont want to split them to multiple scripts so can i mark 10-20 variables and group them under one collapsable menu in inspector (they are variables i have to drag and drop items to) or is there better way to organize a lot of variables?
You need to take a look at customEditors for that, more specifically, the EditorGUILayout.Foldout There is an example of it in the last episode of this series :