AssetDatabase.CreateFolder question

Hello everyone.

I’m having some questions about the AssetDatabase.CreateFolder function.

I’ve created a new folder just fine, simply by using the regular code:
“AssetDatabase.CreateFolder(“Assets”, “My Folder”);”
But I can’t find a way to look inside the Assests folder, and check if the “My folder” already exists (using JAVA).

Also, now talking about the AssetDatabase class, I’ve read it on the unity API that “To use it (AssetDatabase) you have to place your script in Assets/Editor inside your project folder”, but it worked just fine on my regular scripts inside Assets. So I was wondering what kind of functions or situations I would need to place an script inside this Editor folder and, on that case, how could I access that new script.

Any kind of help would be appreciated!

As to the first point, I dont tend to use java myself but this post looks like it might explain a way of doing that in java http://www.coderanch.com/t/381117/java/java/find-whether-folder-exists-or

As for editor scripts, Editor scripts (which should always go in the Editor folder in Assets) are scripts relating to customization of the unity environment, such as custom inspector windows, custom tool windows, etc. This doc should explain this in mor details Unity - Manual: Extending the Editor with IMGUI

The reason that any code using the AssetDatabase should be in here is because the AssetDatabase will not exist in you’re final game, it is only there to assist in the manipulation of the asset and folders in your project whilst in the editor. You can access these scripts just like you would other scripts (as its all still the same namespace in the editor) but its unlikely that you will want other scripts to access editor scripts (unless editor scripts themselves) again because these scripts wont exist in the final build, they are only for the editor.

hope this helps.