Unity3d reference DLL packaging and publishing Problems and Solutions

Source: Internet
Author: User

This year we started to use unity3d to develop MMORPG, And the scripting language uses C #, so that we can use many libraries that have been accumulated in the past. However, the process of using. Net DLL in U3D is not so smooth, for example, the problem we encountered today.

I. Problems

In the current U3D project, striveengine is used as the communication component to communicate with the server. In the U3D environment, compilation and operation are normal, but in the package and release (build) when it is a PC-version executable file, the following error occurs: "argumentexception: The Assembly System. management is referenced by striveengine. but the DLL is not allowed to be encoded or cocould not be found."

Initially, I thought it was a problem of signature or encryption obfuscation, so I used the striveengine. dll generated by the original compilation. The problem exists in the same way.

Next, I guess it may be striveengine. when DLL is compiled, the platform is selected. Therefore, the target platform is changed from anycpu to x86 and striveengine is regenerated. DLL, and select x86 for packaging and publishing in U3D, as shown in:

However, the problem persists.

2. Solutions

After some tossing, we finally found that we need to set up what U3D uses. net version -- click the player Settings button, find the API compatibility level option, and select ". NET 2.0 ", rather ". NET 2.0 subset ", as shown in:

This option means to use the complete. NET 2.0 version instead of its subset. After this setting, you can finally package and publish successfully.

The reason is that striveengine uses the complete. NET 2.0 version.

Iii. Difficulties

Since our game plans to release a lightweight web version, we try to package it into a web version, God, and the same problem arises again, when a web version is released, the API compatibility level is unavailable.

You can only use. NET 2.0 subset to publish a web version.

4. How to get out of the predicament?

Only the web version can be released. NET 2.0 subset is correct, so I want. NET 2.0 subset to develop a striveengine. u3D. DLL, so that it can be packaged and released to various types of platforms. However, which subset does. NET 2.0 subset refer? Is it. NET Compact framework? Or is it the. NET Framework provided by Silverlight? Or others? Hope you can leave a message to tell me.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.