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
0
Question by ForgottenDuck · Feb 24, 2014 at 08:33 PM · assemblycompiler error

Unable to load assembly without recreating project

So I have a Kinect v2 preview kit, and I have been trying to get it to work with unity. After trying a few different approaches, I settled on building a .Net remoting application which will be able to send the data from the Kinect to Unity without having to use a wrapper to access the Kinect within unity. To make this work I had to create a Remotable object class which I named RemotableType. I then use the Visual Studio C# compiler to compile RemotableType.cs into RemotableType.dll. I then run a server application which uses RemotableType.dll, and access that server within Unity using my client.cs script. All of this is working fine for the most part. I am able to get the data I need from my server to my client in Unity.

Now the issue at hand: say I open my project up the next day to work on it, and I need to make a change to RemotableType.cs. I make the change, recompile the dll, and replace the outdated dll's in my server application and unity's assets folder. I then get a type load error from the Unity compiler which claims that it is unable to load RemotableType from assembly RemotableType.dll. I have tried many different things to get rid of the error including: recreating the scene file, deleting and re-adding the dll, and recompiling in monodevelop. Nothing works except for creating a brand new project and copying the assets from the old project into the new. Then the internal compiler error goes away, and the project works as intended.

My only guess as to what is happening is that there is some kind of metadata kept on the imported assemblies that is telling Unity that the new version of remotabletype.dll is not the correct assembly. I'm hoping someone here who knows a bit more about how Unity compiles its projects could shed some light on this issue. As you can imagine, it is a bit of a pain to have to recreate a project every day that I want to work on it.

Comment
Add comment · Show 2
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 Jamora · Feb 24, 2014 at 08:42 PM 0
Share

Unity does create those .meta files for each asset in your project folder. Have you tried deleting the .meta file for your .dll when updating?

avatar image ForgottenDuck · Feb 25, 2014 at 02:03 PM 0
Share

I tried removing all the metadata files in the assets folder, but Unity just recreated them and still gave the error. So I guess I need to figure out what is different about creating a whole new project and getting rid of asset metadata and reimporting the assets.

0 Replies

· Add your reply
  • Sort: 

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

21 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

Related Questions

Moving file failed 2 Answers

Getting tons of compiler errors when I try to open a project,Getting all sorts of compiler errors in Unity when trying to open a project 0 Answers

How override or compile errors to playgame, or import scripts without afect directly the assembly? 1 Answer

namespace support in unity 1 Answer

C# dll "MissingMethodException" - Before first recompile 1 Answer


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