Hello, I’m working on a File manager-like structure with NGUI, so far so good.
The way I got my “Folder” set up, is that a folder consists of “Parts” which consists of a Background, Icon and a Label, “Contents” which carry the folder’s content, a “FolderContent” could either be a “Folder” or “FILE”.
Whenever I “Open” a folder, (in short) I hide the previous folder contents and show the new ones’.
The problem is, when I pickup a folder and move it with the mouse (drag and drop or just pick and hold) I auto-organize the current folder’s contents (reposition them), when a folder gets repositioned (n shifts to the left/up), its contents also shift with it, so when I open the folder later, I will see that the contents’ are not positioned correctly.
I can get around that by using one of my methods “OrganizeContents” which does exactly what you think, but that wouldn’t be necessary to do each time I open a folder, it’s redundant.
Have a look:
Any ideas how to move a gameObject without affecting its children?
Another work-around would be to move the Folder’s “Parts” when auto-positioning it, but that would bring inconsistencies in other places.
If I can’t do what I’m asking for, any other work-arounds beside the two I mentioned?
Thanks.