Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 KeldorKatarn · Oct 03, 2017 at 07:14 PM · scripting problemvisual studioreferenceassembly

Referencing Mono Framework assemblies

So I'm trying to use MEF (Managed Extensibility Framework) in the bleeding edge Mono of Unity 2017, but I'm unsure how to properly do it. Obviously I can't add the reference in the Visual Studio project since that's not only blocked but would get overridden everytime Unity regenerates the project anyway. The only thing i found in the forums is "copy the assembly into your asset folder". Is that really the way to do this? I mean, is there no place in the editor where I can tell Unity how to generate the project, to add a reference and copy the assembly in question to the build output later? Do I have to have that stuff in the asset folder? And if so.. it's a bit tricky to find the right one.

Do I use the one in Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5 or in C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5-api and so on.

I thought I had been able to add a reference to mono framework stuff in the past but I can't remember how. I THOUGHT there was some window in the editor where I could specify that.

Any help on this would be appreciated. If the best solution really IS copying the dll to the asset folder than I'd like to see this optimized in the future. I understand why I can't simply do it in my IDE as usual, but there should be a UI in the editor to do this. I shouldn't have to go assembly hunting.

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

Answer by Bunny83 · Oct 03, 2017 at 08:53 PM

No, the only way is to actually include the assemblies in your project. Keep in mind that a Unity game does not rely on the Mono or .NET framework on the users computer like normal .NET / Mono applications. The Unity engine is actually written in C++. It just uses Mono as scripting environment. By default it only includes the core assemblies which are necessary.

If you need additional functionality you have to include those assemblies in your project. It actually doesn't matter if it's an assembly from the Mono framework or one of your own assemblies.

Finally the reason why the Unity VS Tools actively prevent you from editing the project settings is that Unity actually doesn't care about the ".csproj" file at all. It just creates those automatically so you can open the project in VS / MonoDevelop. Unity actually builds the project assemblies "manually". It automatically references all assemblies which are in the project when compiling the scripts in the project.

Comment
Add comment · 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
0

Answer by KeldorKatarn · Oct 03, 2017 at 08:59 PM

Fair enough. I know WHY I can't add it and I know it doesn't rely on an installation. I just wondered if there was an easier way to include an assembly. The mono runtime assemblies of the mono version that unity uses are included in the installation, so it would be easier if I could just go in the editor to some play and select the mono assemblies I need in my project and Unity would add the automatically without me having to go and search for the DLL to copy it. But thanks for the reply. I just wanted to make sure I'm not missing an easier and better way to do things.

Comment
Add comment · 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

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

122 People are following this question.

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

Related Questions

Visual Studio 2010 Professional, Missing System.Web assembly reference 0 Answers

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

Why does Unity does not see my DLLs? 1 Answer

How to resolve script references in scene bundles from dynamically loaded assemblies? 1 Answer

Accessing a script only using its string 3 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