dllnotfound exception - какая возможная причина?

Столкнулся с такой проблемой - у меня есть две либы которые я добавил сюда Assets\Plugins\Android. Имя первой mylibrary и второй libtetdecoder.

Я пробую вызвать методы одной и другой одинаковым способом и первая работает как ожидается, а вторая нет, из за такой ошибки

    (Filename: <d25e5b88a8b44b89b27c70e01a22f338> Line: 0)
2020-09-15 09:39:53.243 26169-26207/? E/Unity: DllNotFoundException: libtetdecoder
        at (wrapper managed-to-native) TestScript.foolib()
      at TestScript.Update () [0x00021] in <d25e5b88a8b44b89b27c70e01a22f338>:0 

Вот код как я пробую обратиться к методам этих либ

using UnityEngine;
using System.Runtime.InteropServices;
using UnityEngine.UI;
using System.Globalization;

public class TestScript : MonoBehaviour
{
    public Text myText;
    public Text myText2;
    private const string pluginNameFirst = "mylibrary";
    private const string pluginNameSecond = "libtetdecoder";

    //native interface
    [DllImport(pluginNameFirst)]
    private static extern int foo();

    //native interface
    [DllImport(pluginNameSecond)]
    private static extern int foolib();

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        int i = foo();
        myText.text = "HERE : " + i;

        int il = foolib();
        myText2.text = "HERE : " + il;
    }
}

что делаю не так? Почему юнити нормально находит первую либу и не находит вторую?


Ответы (0 шт):