unity中有C++dll Android和window的编译

unity中有C++dll Android和window的编译


public class testDll : MonoBehaviour

{

    [DllImport("DllForUnity")]

    public static extern int MyAddFunc(int x, int y);

    public Text m_test;

    // Use this for initialization

    void Start()

    {

        int ret = MyAddFunc(200, 200);

        m_test.text = ret.ToString();

    }

}

你可能感兴趣的:(unity中有C++dll Android和window的编译)