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
1
Question by niki9000 · Jun 14, 2015 at 03:51 PM · errorunityeditorfileerror build

Cant build my Game! UnityEditor Namespace not found?

Hey, when i try to build my game, i get the following errors: alt text

Im using the UnityEditor namespace for the OpenFolderPanel function and for the OpenFilePanel function. When i start the game in the Editor, everything works fine but when try ti build I get these errors. Can someone tell me what I did wrong???

( IF the picture is too small, click this link for a bigger version )

unbenannt.png (22.7 kB)
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

2 Replies

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

Answer by tanoshimi · Jun 14, 2015 at 03:52 PM

Classes in the UnityEditor namespace can only be used in the editor, not in a build.

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 niki9000 · Jun 14, 2015 at 04:00 PM 0
Share

how can I use the OpenFolderPanel in a built game?

avatar image tanoshimi · Jun 14, 2015 at 04:28 PM 1
Share

You can't. But you could try:

  • http://wiki.unity3d.com/index.php/FileBrowser

  • https://www.assetstore.unity3d.com/en/#!/content/18308

  • http://www.starscenesoftware.com/unifilebrowser.html#UniFileBrowser

avatar image
5

Answer by O4s · Jun 14, 2015 at 06:42 PM

If you were just using OpenFolderPanel etc in the Editor you can do:

 #if UNITY_EDITOR
 using UnityEditor;
 #endif

I had that error with an Audio asset when I tried to build, so I found the above answer which worked. However I'm guessing you might be trying to use those Unity Editor features at runtime so this may not work for you.

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 dkaufmanjs · Dec 30, 2015 at 10:46 PM 0
Share

This worked perfectly for me. I was having the same issue. So simple that I didn't even think of it.

avatar image Jimmyrooster · Jul 29, 2018 at 09:25 AM 0
Share

You could put it around the whole script

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

6 People are following this question.

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

Related Questions

Problem with my project after moving it out and back into my computer (which has been recently reset) 0 Answers

Unsafe.dll from Unity version conflicts with Unsafe.dll from standard collections package. 1 Answer

Google.IOSResolver.dll' will not be loaded 2 Answers

Error opening project.,Error opening project 0 Answers

4 errors after implementing unity ads in my game. 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