Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to make a native dictionary and work with it?

Discussion in 'Entity Component System' started by Zimaell, Aug 26, 2023.

  1. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    337
    How to make a native dictionary so that it has a key and value from my structure, and also how to iterate over it later.
    as I understand it, NativeHashMap is used for this, I tried to create the same and sort through it like a normal dictionary, but it didn’t work, so tell me how to create and work with it correctly ...
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,556
    NativeHashMap is the way to go.

    What didn't work?
    Show us your code.