-2

I am using Unity and writing C# scripts in notepad++. Can someone tell me how to use set data structure or in general point me to documentation where I can find details about data structures like priority queue that I can use with C# script in unity.

I am using something like

SortedSet my_Set1 = new SortedSet();

And the error is :

error CS0246: The type or namespace name `SortedSet' could not be found. Are you missing an assembly reference.
Madhuparna Bhowmik
  • 1,142
  • 1
  • 8
  • 20
  • Possible duplicate of [Priority queue in .Net (closed)](https://stackoverflow.com/q/102398/7111561) – derHugo Jun 11 '19 at 16:57
  • I have changed the tags, thank you. – Madhuparna Bhowmik Jun 11 '19 at 17:16
  • maybe checkout [`System.Collection.Generic`](https://docs.microsoft.com/dotnet/api/system.collections.generic) and simply use the kind of structure you need for your case .. and don't forgtet to include the `using` statement on top of your script `using System.Collection.Generic;` – derHugo Jun 11 '19 at 17:20
  • I figured out the problem it was with scripting runtime version. – Madhuparna Bhowmik Jun 12 '19 at 17:54

1 Answers1

0

Okay now the problem is sorted. The problem was with Scripting Runtime Version. Changing scripting runtime version to .Net.4.x works.

Following are the steps -

Edit -> Project Setting -> Player Setting -> Other setting -> Configuration -> Scripting Runtime version

and change it to .Net 4.x

Madhuparna Bhowmik
  • 1,142
  • 1
  • 8
  • 20