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

Unable to use any plugin for Mac OS X in Unity Stadnalone/editor. 2020.1

Discussion in 'macOS' started by trackOfer, Jan 17, 2021.

  1. trackOfer

    trackOfer

    Joined:
    Dec 27, 2017
    Posts:
    10
    Hi, I am unable to make any plugin work with Unity in Mac for Mac Os X.

    What I am trying to do is have a function that returns an int from native code and show that on screen.
    However I get the exception EntryPointNotFound for this function.

    unityDeviceMac.h
    //////////////////////////

    //#import <Metal/Metal.h>

    extern "C" {
    int TestFoo();
    // id<MTLDevice> GetUnityNativeDevice();
    }

    unityDeviceMac.cpp
    //////////////////////////

    #import "unityDeviceMac.h"

    int TestFoo()
    {
    return 999;
    }
    /*
    id<MTLDevice> GetUnityNativeDevice()
    {
    return UnityGetMetalDevice();
    }*/

    But now I see that "__Internal" only make sense for iOS, not Os X.
    So how do I import this in OSX? Standalone and editor?

    I know you need to build an OSX plugin as a bundle.
    I was able to do that, but didn't make it work as well.
     
  2. BurningthumbStudios

    BurningthumbStudios

    Joined:
    Apr 28, 2008
    Posts:
    95
    I was having similar issues on Unity 2021.3.

    Finally I built the plugin as a bundle and when I build for macOS the plugin is found and runs.

    But in the Editor, its not found. I have no idea why. Anyway for me having it work in the build is "good enough", it was just an annoying waste of time that it did not work in the editor.