I have experimented a little with the C# scripts inside a Unity project, but can Unity be used as a standalone component ?
static void Main(string args)
Unity.Application app= new Unity.Application();
Answer by jashan
Dec 08, 2009 at 02:29 PM
As Jaap pointed out: It's not possible in the way your example would indicate. However, since Unity 2.6 it is possible (again?) to embed the Unity Web Player as an ActiveX control which may help you achieve the desired result of embedding a Unity game in a standalone .NET application.
Quote from the release notes, under Windows Specific Fixes:
Windows Web Player ActiveX control can be embedded into non-browser applications (previously it failed to download the data file)
One resource that may help you get up and running is Using COM Components with Visual Basic .NET. That's related to Visual Basic, so you may have to do a little "translation work" - but the approach should work just as well with C#.
There's also a discussion about this in the forums - so, even though this theoretically should be possible, it seems that it's not particularly reliable (in particular, there's no documentation so directly communicating with the ActiveX control will be very difficult or impossible to implement): unity activex control in windows forms
See also: Unity Answers: Is it possible to build a standalone .net application that link UnityEngine.dll
Answer by Jaap Kreijkamp
Dec 08, 2009 at 01:34 PM
No, Unity is not a .NET program/library but is a standalone application that has the .NET runtime (actually MONO) embedded.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
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.
Answers and Comments
1 Person is following this question.
The name 'Joystick' does not denote a valid type ('not found')
Setting Scroll View Width GUILayout
Material doesn't have a color property '_Color'
How to import the object from server to unity