Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by sebas77 · Oct 25, 2013 at 04:02 PM · collectionsdatastructure

I need a good data structure collection for Unity, where can I find it?

I need it in c#.

C5 Generic Collection Library seems to be very complete, but it does not work on Unity. Any suggestion?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Oct 25, 2013 at 04:30 PM 0
Share

Have you tried to do your own? There are few examples here : http://stackoverflow.com/questions/102398/priority-queue-in-net

avatar image sebas77 · Oct 25, 2013 at 04:33 PM 0
Share

yes I was there before...I have already a working o(1) code I found on internet, but I was wondering if there was a good collection.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Azrapse · Oct 25, 2013 at 04:17 PM

Use System.Collections.Generic plus System.Linq and you'll have an awesome collection toolset that is supported in Unity.

What you miss from there that you need?

Also, what keeps you from using it in Unity if you have access to the sources of C5?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sebas77 · Oct 25, 2013 at 04:22 PM 0
Share

c5 does not work out of the box and it seems hard to fix.

Linq is good, but it's not a collection of data structure. I.$$anonymous$$ I need a priority queue.

avatar image
0

Answer by adamhill · Jul 13, 2016 at 02:28 AM

C5 now works with Unity3d - https://github.com/sestoft/C5#c5-on-unity3d

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image christougher · Dec 09, 2019 at 06:14 PM 0
Share

Importing C5 from this link leads to a slew of errors... any particular thing one needs to do to adapt C5 for Unity?

avatar image Bunny83 christougher · Dec 09, 2019 at 08:53 PM 0
Share

Well, when you check the history you will notice that in February 2019 they decided to only support .NET Standard 2.0. So they officialy dropped support for any older .NET standard. Though the greatest issues is that in later commits (I guess the one from $$anonymous$$ay 7, 2019 might be the main issue) they actually solve some issues they had with the new nullable reference types and extensively used the new C# 8 feature the "null-forgiving" operator. Of course this syntax isn't supported by any compiler before C# 8. Even Unity has finally moved on from C# 3.5 / 4.0 to support C# 7, Unity does not yet support C# 8 features.


What you can do is simply use the latest commit from 2017 before they did the move to .NET standard 2.0 (direct download link) which should still work with Unity. At least I just have tried building it with VS 2017 (which came with an older Unity version) and it compiled without any issues.

avatar image christougher Bunny83 · Dec 09, 2019 at 09:02 PM 0
Share

You are amazing! Thanks!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Using HashSet in Unity 3 Answers

OrderedDictionary on Mobile 0 Answers

NativeList Empty Outside Job But Not Inside It 1 Answer

"mscorlib.dll" wrong when UnityLoadApplication() on ios? 0 Answers

How to organize challenge system? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges