Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to use a .dll plugin in C# script

Discussion in 'Scripting' started by alexstar3000, Sep 12, 2023.

  1. alexstar3000

    alexstar3000

    Joined:
    Jul 14, 2023
    Posts:
    1
    So I have a plugin in the .dll form in the plugin folder but I have no idea on how to call its methods from visual studio and get any autocompletion whatsoever.
     
  2. CodeRonnie

    CodeRonnie

    Joined:
    Oct 2, 2015
    Posts:
    280
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    What plugin is this?

    A random DLL won't just magically work within Unity.

    A software that provides (some of) their functionality as .NET DLL should provide you with documentation on how to call its functions from C#. If there is no such documentation or the examples aren't for C# you can almost bet it won't work with Unity.

    Even if the software specifies that it supports Unity it may not support all editor versions or target platforms.
     
    Kurt-Dekker likes this.