Last active
June 2, 2018 05:19
-
-
Save dadadax/55b6d5d8a4608d6db266a979d6dd9e5b to your computer and use it in GitHub Desktop.
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; | |
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