• 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 boribhi · Mar 10, 2010 at 11:54 PM · mononamespaceassembly

namespace support in unity

Hi, when I tried to use "using System.Windows;" & "using System.Windows.Forms;" in a C# script file, an error occurred says like "Windows does not exist in System" "are you missing an assembly or directive", but it is OK when I use "using System.IO;" for example.

Why?

Although System.Windows.Forms is a name space available in .NET 1.1

What .NET version Unity supports ? and is it a full support?

the issue is that I want to use OpenFileDialog. I tried filebrower by AngryAnt but with errors like "DirectoryInfo in unknown identifier"

Thanks

Edit (clarifications):

Thanks I mentioned that I want to use OpenFileDialog (which belongs to System.Windows.Forms according to MSDN website ),so that this (at runtime) gives the user the ability to browse,for example, his harddisk and choose a file such as an mp3 and play it during the game. I knew that Unity is using Mono framework, However I meant in the question the .net functionality support. I searched in C:\Program Files\Unity\Editor\Data\Frameworks\Mono.framework,found System.Windows.Forms.dll and did not found System.IO.dll.However,no error occurred when using System.IO,but an error occurred when using System.Windows.Forms.dll .

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
3
Best Answer

Answer by Michael La Voie · Mar 11, 2010 at 12:39 AM

The .Net framework is windows only and thus Unity opted to go with the open source port of it called the mono framework.

You will not necessarily have access to the same namespaces. Unity currently uses an older version of mono, though they'll be updating to a modern version with unity 3.0 in the summer of 2010. Their current version of mono supports roughly the .net 2.0 level of functionality. The mono framework does have a port of System.Windows.Forms, but Unity may not include it.

What in particular did you need from System.Windows?

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 Loophole · Mar 27, 2010 at 08:25 AM 1
Share

It would be nice if Unity actually documented what subset of .NET was supported on the iPhone. Currently it seems to be a process of trial-and-error!

avatar image ubik2 · Mar 09, 2012 at 02:41 AM 0
Share

This is a $$anonymous$$onoTouch doc, rather than a Unity doc, but I've found it tremendously useful for iPhone limitations. At the bottom, there's a link to the portion of .NET implemented in $$anonymous$$onoTouch.

http://docs.xamarin.com/ios/about/limitations

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

How to use CSharpCodeProvider in windows standalone? 1 Answer

The type or namespace name could not be found. Are you missing a using directive or an assembly reference? 3 Answers

Runtime loaded assemblies 1 Answer

Enumerators and pdb2mdb 1 Answer

References and Namespaces 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges