Hi,
Quote:To make matters worse, our project using svn (before i joined in). sorry...
This is definitely the problem, please only use Esenthel Server for project synchronization.
"Data" file contains crucial information about your project (all elements used and some of their metadata). Using SVN you just replace the file from one computer, without doing any synchronization, which will cause many problems for you, including:
-project elements going missing
-project elements having outdated data
-many others
You can iterate all files in Game and Edit folders, with FileFind
Code:
Edit.EditorInterface EI;
EI.connect(..);
if(!EI.getElms(elms))Exit("can't get elms");
for(FileFind ff(game_folder_path); ff(); )
{
UID id;
if(DecodeFileName(ff.name, id)) // if this is ID based element
if(!Edit.FindElm(elms, id)) // if was not found in the project
FDel(ff.pathName()); // remove the file or folder
}
I wrote this quickly without testing, but should work ok, you can execute this for both "game" and "edit" folders.
Please try it first on a test project.
Alternative solution without writing any code is to:
-create a new empty project "Copy"
-open your existing project
-select all elements
-right click on them and select "copy\to another project"
-select "Copy" project as the destination and press OK
-only used files will be copied and the new project will not have any useless files.