Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by VitorValadares · Sep 07, 2012 at 01:10 PM · editorjavaassetdatabase

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!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by FatWednesday · Sep 07, 2012 at 03:11 PM

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 http://docs.unity3d.com/Documentation/Components/gui-ExtendingEditor.html

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image VitorValadares · Sep 07, 2012 at 03:25 PM 0
Share

I see! Well, that actually helped!

In fact I rather use C# on most cases, but I'm building this project for an exercise, and it was mandatory to use Java.

avatar image ArkanRow · Aug 29, 2013 at 09:55 PM 1
Share

As far as I know, Unity does not support Java, but Javascript, which are not the same and are not related in any way besides the na$$anonymous$$g.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Script Editors for Unity 3 Answers

Problem with GooglePlayServicesResolver 2 Answers

Settting Selection.activeObject to multiple items 1 Answer

Proper way to update AssetDatabase after creating assets? 0 Answers

Adding more image to detect but not updating application Arkit. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges