Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Can not find the class in dll not directly inherit from MonoBehavior when add a component.

Discussion in 'Editor & General Support' started by watsonsong, Aug 1, 2019.

  1. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    I compile my code into dll and put it inside unity. And I upgrade to Unity 2019.2 find some problem.
    I can not find any class which not directly inherit from the MonoBehavior in the add component menu.

    For example I have a class used to block the UI input. It extend the Graphic class. But I can not find the reference inside the DLL:
    ```
    public sealed class Block : Graphic, ICanvasRaycastFilter
    {
    }
    ```

    When I compile this class into a dll, I can not find this class, but I can access it using code.
     
  2. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Hi, how about this issue. Is it cause by search path "Library/ScriptAssemblies"?
    I think it still not fixed in 2019.2.2f1
     
  3. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Bump this issue, this bug is still existed in 2019.3.0b1~
     
  4. Domas_L

    Domas_L

    Unity Technologies

    Joined:
    Nov 27, 2018
    Posts:
    111
    Hello! Could you please submit a bug report with the project in which we could reproduce this behavior?
     
  5. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    @Domas_L, I submit a bug report: Case 1181122 with a test project.
     
  6. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Hi, @Domas_L, this problem seems happened again on Unity2019.3.1f1
     
    javaduan likes this.
  7. Domas_L

    Domas_L

    Unity Technologies

    Joined:
    Nov 27, 2018
    Posts:
    111
    Could you please respond to the CQA email with the new information? I see that the case was closed as there weren't enough information to reproduce the issue locally.