• 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
18
Question by dx20 · Dec 15, 2018 at 02:19 PM · errorerror messageupgradeattributeupgrades

ExtensionOfNativeClass attribute missing error in Unity 2018.3

After installing Unity 2018.3 and opening project that was created with Unity 2017 I'm getting "missing ExtensionOfNativeClass attribute" error in Unity console window for one of the classes in the project.

Project builds without error in Visual Studio 2017.

Anyone has an idea what might be causing this error?

EDIT

Thanks for your help jacovd.

Actually simple renaming of class helped to remove the issue.

The class that was causing the error used to inherit from MonoBehaviour and it was simplified to regular class just like in your case so I believe this was a problem very similar to the situation you described.

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

5 Replies

· Add your reply
  • Sort: 
avatar image
53
Best Answer

Answer by jakovd · Dec 19, 2018 at 01:24 PM

I had the same error and I found that I had a class that was once a ScriptableObject and an instance was created in Project. Later that class simplified to a regular class (removed inheritance) which made the instantiated object corrupted: you can only instantiate MonoBehvaiours and ScriptableObject and this class was not one of those anymore. Look for your ScriptableObject in Project or GameObjects in Hierarchy that will show this message in Inspector:

The associated script can not be loaded. Please fix any compile errors and assign a valid script.

Comment
Add comment · Show 7 · 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 Nikaas · Dec 29, 2018 at 07:08 PM 0
Share

This same thing happened to me with the new prefabs. Simplified a class to not derive from $$anonymous$$onoBehaviour and removed the components from the game object but forgot to apply the changes to its prefab.

avatar image ferranases · Jan 24, 2019 at 03:09 PM 0
Share

In my case this worked:

  1. I have one object and it have only one script,the static script

  2. Go to the object and delete it

if you have a static class in the new versions it don't need to be added to a object, you dont need to place the scritp in any place,only have it created

avatar image Rs · Jan 31, 2019 at 10:21 AM 0
Share

SPOT ON!!! I think this errors need a less misterious statement.

avatar image LeleUnity · Mar 10, 2019 at 01:33 AM 0
Share

@jakovd I can't find the object that uses the script ! any help? select dependencies doesn't find anything...

avatar image jakovd LeleUnity · Mar 17, 2019 at 09:19 PM 0
Share

Try checking out your prefabs too. $$anonymous$$anually.

avatar image SweatyChair · May 14, 2019 at 12:42 AM 0
Share

Same thing happened to me, I have $$anonymous$$onoBehavior classes and attached to prefabs, later then I changed them to static classes.

Show more comments
avatar image
15

Answer by kthrose · Apr 18, 2019 at 04:53 PM

FWIW I had this same issue when I changed a script from MonoBehaviour to static - it was still in a Script component on my UIManager game object, so Unity was unhappy.

TL;DR This error means you have a Script component on a game object in your scene hierarchy which likely was, but no longer is, extending MonoBehaviour.

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
4

Answer by PaulUsul · Nov 30, 2019 at 12:37 PM

If your project is so big that you can't find the prefab with the culprit.

You can search for like this is in the Project view

ref:Assets/Scripts/Folder/CulpritClassName.cs

It can also be done by right clicking the script file->Find reference in scene then copy the search string from the scene to the project view.

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
0

Answer by kubajs · Dec 17, 2019 at 10:42 PM

I had to remove the affected class from the project (from Visual Studio) and then re-create it. No object in object inspector used the class but the error message was still present. Once I removed, the class file, rebuilt and re-created the class again, the problem was gone. HTH

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 ngoson107 · Feb 27, 2020 at 03:19 PM

You need rename class inheritance ScriptableObject as same as name Script

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

147 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 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

error "not all code paths return a value" in a function 1 Answer

Data folder not found 6 Answers

Webcam mapping buffer error 1 Answer

Visual Studio Code doesn't work for with unity 2 Answers

,why cant i build my project 0 Answers

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