I totally understand that I need to instantiate prefabs before using and so on, however, I am now getting such an "inaccessible" error with a Class of the C# collection.
I try to use a ConcurrentQueue ([System.Collections.Concurrent.ConcurrentQueue][1]) and the code looks like this:
using System.Collections.Concurrent;
using UnityEngine;
using System.Threading;
public class Agent : MonoBehaviour {
static private ConcurrentQueue tasks = new ConcurrentQueue();
Although the docs list "ConcurrentQueue" Unity keeps saying:
"System.Collections.Concurrent.ConcurrentQueue is inaccessible due to its protection level"
How can I use it? Why does Unity complain at all, since the class is supplied by System.Collections.Concurrent?
[1]: https://msdn.microsoft.com/en-us/library/dd267265(v=vs.110).aspx
↧