How to Serialize a Dictionary in Unity | #unityin60sec

preview_player
Показать описание
In this tutorial we will see how to serialize a dictionary or anything else that you can't usually serialize and make it show in the inspector of your unity project to help you improve the process of making and developing games.
#unityin60sec

Come hang out on Discord
Рекомендации по теме
Комментарии
Автор

*** Note ***
This will not work if you have " : MonoBehaviour" in your class.
Got into this problem myself so make sure to remember this😁

NerdHead
Автор

Nice! A slightly alternative approach would be to have NewDict inherit from Dictionary, that way you don’t have to have to dictionary

mrcallum
Автор

nice and fast, almost as I though is should work, but I lack information about annotation Serializable for class. Thanks man

oleksandrhaidukov
Автор

Dude thank you. It worked great for me. I needed a way to get list of object at a certain number for my visual novel demo and I didn''t want to run trough bunch of name checks and controllers so this were the thing I was looking for. If someone else has a better solution to my problem feel free to show me how. But until then this works great!

emirkanhuluca
Автор

is it working in the scirptable object i tried but could not get my dictionary from the scriptable object to work in the inspector
from the project by selection

HassanAli-xons
Автор

It does not work on a ScriptableObject...

tastypatrick
Автор

типа заполняем массив а потом переводим его в словарь ?

thevirusnvgm