This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Runtime.InteropServices; | |
public class ADD_Script : MonoBehaviour { | |
[DllImport("ADD")] | |
private static extern int ADD_2(int A, int B); | |
private readonly int _A = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifdef ADD_EXPORTS | |
#define ADD_API __declspec(dllexport) | |
#else | |
#define ADD_API __declspec(dllimport) | |
#endif | |
extern "C" { | |
ADD_API int ADD_2(int A, int B); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ADD.h" | |
ADD_API int ADD_2(int A, int B) { | |
return A + B; | |
} |