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

Resolved Can't use a plugin

Discussion in 'Scripting' started by Marcinx0x, Sep 30, 2020.

  1. Marcinx0x

    Marcinx0x

    Joined:
    May 2, 2020
    Posts:
    8
    Hello, I'm stuck with some problem. I can't create an object of a class which is located in plugins folder. Maybe somebody knows what i can do to solve this.
     

    Attached Files:

    • one.PNG
      one.PNG
      File size:
      88.3 KB
      Views:
      368
    • two.PNG
      two.PNG
      File size:
      36.8 KB
      Views:
      360
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    There is a good chance it's in a namespace. Right click on NativeShare, select the lightbulb and see what options it gives to resolve it. You may be missing the correct Using statement.
     
  3. Marcinx0x

    Marcinx0x

    Joined:
    May 2, 2020
    Posts:
    8
    I think I have checked it, but I'll try again when I get home, thanks!
     
  4. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,184
    Could it be that you are using ASMDEF files? It looks like the plugin has an ASMDEF file. You need to reference this file in your own ASMDEF file in this case.

    upload_2020-9-30_17-50-50.png
     
    DaDarkDan likes this.
  5. Marcinx0x

    Marcinx0x

    Joined:
    May 2, 2020
    Posts:
    8
    Thanks for tips guys but its not it, i'm not using asmdef files, and i cant use namespace of NativeShare. I think i am missing something, but honestly i have no idea why i can't even get to use it via using.
    Can it be problem with unity version? i had the same problem with admob sdk. Downloading earlier version of admob sdk has helped me back then.
    My unity version is 2019.3.12.f1
     
  6. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    What is the plugin you are using?
     
  7. Marcinx0x

    Marcinx0x

    Joined:
    May 2, 2020
    Posts:
    8
    It's native share for ios and android from asset store
     
  8. Marcinx0x

    Marcinx0x

    Joined:
    May 2, 2020
    Posts:
    8
    I fixed it by removing plugin's ASMDEF files, and moving it out of plugins folder. Looks like it works now
     
  9. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    Hmm...well, glad you got it working. I've used the plugin before, but installed it last night without issues, so I didn't have a clue what was up with it on your end.