• 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 Hogge · May 31, 2020 at 10:38 PM · compiler error

Codegen bug?

Hey, people.

I just tried to reimport an errosion tool I've used in the past and I got the following compile error:

Assembly 'Unity.Properties.Codegen' is a CodeGen assembly and cannot be Auto Referenced (Packages/com.unity.properties/Unity.Properties.Codegen/Unity.Properties.Codegen.asmdef)

I've tried to remove the asset from the project, but the problem persists.

Ideas?

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

Answer by Aviryx · May 31, 2020 at 11:01 PM

Assembly definitions are used to organise scripts in a project into assemblies. When you create one Unity compiles a separate managed assembly from all the scripts in that folder (You can only have 1 assembly file per folder).


Auto Referenced specifies if all the predefined assemblies should reference the project assembly (this matches how precompiled assemblies are referenced by predefinied assemblies).


If you are trying to get rid of it then you need to uninstall the entire package and possibly restart unity. If you are trying to get it to work then you could try to select the CodeGen assembly file and uncheck "auto-referenced" to see if that works (might require another restart of Unity) or delete the codegen assembly file.


or you could try creating a new asmdef and copy/pasting to see if the cause is something to do with Unity.

Comment
Add comment · Show 1 · 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 Hogge · Jun 01, 2020 at 09:44 AM 0
Share

How do I do any of those? I can't uncheck autoreference because it's greyed out :(

avatar image
0

Answer by gtox · Jan 19 at 07:53 PM

@ Hogge - I know this late, but someone might find it useful. I had the same issue (after importing the Terrain Water Erosion addon and all its dependencies). To uncheck 'Auto-referenced' ,as Aviryx suggested, you need to open the Unity.Properties.Codegen file in a code editor and change "autoReferenced": true, to "autoReferenced": false,

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.

Welcome to Unity Answers

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.



Follow this Question

Answers Answers and Comments

128 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Compiler Errors 0 Answers

Why do I keep getting this error? 2 Answers

Building on android. 1 Answer

Error with InvokeRepeating 1 Answer

So much compiler errors 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges