Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 TwoBitOI · Apr 06, 2016 at 05:04 AM · visual studioreference

Visual Studio adding custom references

Hi everyone,

I want to add a custom Classlibary to my Unity project in visual studio that is embedded in an other c# project. But when I right click on references I'm not able to add a new reference like in standard c# project generated in vs. Anyone an idea what i have to do to add a class from an other project.

cheers, Robert

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
1

Answer by troien · Apr 06, 2016 at 08:22 AM

See Plugins.

A very short summary:

  1. create a dll.

  2. Put the dll into a folder named 'Plugins' inside the Assets folder (Unity 5.0 and later don't require this, just place in somewhere inside your assets and use the inspector)

  3. enjoy.

But the link explains it a lot better ^^ (after following the link, click next for more info on how to do all of this, as this topic spans several pages in the manual)

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 JuanMontesinos · Mar 29, 2017 at 04:01 AM 0
Share

This solution does not work.

avatar image troien · Mar 29, 2017 at 07:06 PM 0
Share

It does work, but I agree that this tutorial does not cover everything that has to be in place for it to work.

there are many cases why this might not work, not all of them are covered in that tutorial sadly and that means its really just learning through trial and error.

For instance, the .net framework used to build the dll has to be right, as explained in this question. (For which .Net version, look at this question)

Now like I said, there can be more reasons, the one I just said was the only one I had problems with (or at least the only one I can remember), but I'm sure it's not the only problem you could encounter...

Usually if you got to the point where you want to use a dll in Unity, you have decent knowledge of C# and Unity and should be able to solve most of these problems (as long as you have access to the source code of the dll at least). To start I would suggest creating a small project with just one test class, build it to dll and then try and see if you can follow the linked manual pages to access this dll through code.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Why does Unity does not see my DLLs? 1 Answer

Adding assembly reference in visual studio causes error in unity 0 Answers

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

Referencing Mono Framework assemblies 2 Answers

Losing GUIText Reference in Prefab 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