Nested keys?
Re: Nested keys?
Hi there,
Nested keys aren't possible. However, you could create two separate keys and achieve the same thing. For example you could have a key named "parentKey" and then a key named "parentkey_childkey".
All the best,
Joel
Nested keys aren't possible. However, you could create two separate keys and achieve the same thing. For example you could have a key named "parentKey" and then a key named "parentkey_childkey".
All the best,
Joel
Re: Nested keys?
Not the same because if I deleted "parentkey" then "parentkey_child" would still exist.
I was hoping to cut my work short.
Unless there's a way i can delete every key starting with "parentkey"?
I was hoping to cut my work short.
Unless there's a way i can delete every key starting with "parentkey"?
Re: Nested keys?
Hi there,
Key/value collections do not work in this way unfortunately, much in the same way that you can't have nested keys in a C# dictionary. If you wish to nest data in this way then you would need to create a class which represents that structure. For example:
And then save:
Then to load:
And to delete:
Hope this helps.
All the best,
Joel
Key/value collections do not work in this way unfortunately, much in the same way that you can't have nested keys in a C# dictionary. If you wish to nest data in this way then you would need to create a class which represents that structure. For example:
Code: Select all
public class Parent
{
public string child;
}
Code: Select all
ES3.Save("parentKey", myParentClass);
Code: Select all
string child = ES3.Load<Parent>("parentKey").child;
Code: Select all
ES3.DeleteKey("parentKey");
All the best,
Joel