Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Strange Bug with Classes

Discussion in '2019.1 Beta' started by Rhyusaky, Dec 1, 2018.

  1. Rhyusaky

    Rhyusaky

    Joined:
    Jan 22, 2016
    Posts:
    25
    Unity is not recognizing some scripts like MonoBehaviours, a very strange bug, the version is 2019.1.0a8, I do not understand, only some scripts I created presented this problem, but it happened with every object in which this script is placed.
    It also has some proprietary Engine scripts with this problem, such as EventSystem.
    It simply pops up a field called 'Generator Asset' of type object, and when I put some object there, the script icon changes on the object.
    Also, when I get any script with this field by code, such as FindObjectOfType, it returns Null.
    Inspector0.PNG Inspector1.PNG Inspector2.PNG Code0.PNG
     
  2. pointcache

    pointcache

    Joined:
    Sep 22, 2012
    Posts:
    579
    Does the .cs file name match the class name?
     
  3. Rhyusaky

    Rhyusaky

    Joined:
    Jan 22, 2016
    Posts:
    25
    Ok, I solved the code problem, it is because I am calling FindObjectsOfType in OnDestroy, it is fixed.
    But, why this property called 'Generator Asset' is showing in a lot of components?