Is the doc for managed plugin development up to date?
I tried following the steps, but get an error “A namespace can only contain types and namespace declarations”.
using UnityEngine;
using System.Collections;
using DLLTest;
void Start () {
MyUtilities utils = new MyUtilities();
utils.AddValues(2, 3);
print("2 + 3 = " + utils.c);
}
void Update () {
print(MyUtilities.GenerateRandom(0, 100));
}
Looking online it seems like this code needs to be in a class or something (I would suspect such based on my basic C# knowledge, but am trying to follow the docs). I can wrap it in a MonoBehavior to get it to compile and run, but it doesn’t do anything.