Managed Plugins Docs

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.

I am no expert… but the UsingDLL page shows you how you create the DLLTest. When you use this from inside your Unity application you’ll need a normal Unity project. In your code example you miss a correctly arranged script. In your code example you miss out the way that a script is set up:

public class Blah : MonoBehaviour {
  void Start () {
  }
  void Update () {
  }
}