Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dadadax
Last active June 2, 2018 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dadadax/55b6d5d8a4608d6db266a979d6dd9e5b to your computer and use it in GitHub Desktop.
Save dadadax/55b6d5d8a4608d6db266a979d6dd9e5b to your computer and use it in GitHub Desktop.
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;
private readonly int _B = 2;
// Use this for initialization
void Start () {
GetComponent<TextMesh>().text = ADD_2(_A, _B).ToString();
}
// Update is called once per frame
void Update () {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment