Modding:TreeAttribute: Difference between revisions

From Vintage Story Wiki
Line 5: Line 5:
To use TreeAttribute, add the using statement for '''Vintagestory.API.Datastructures'''.
To use TreeAttribute, add the using statement for '''Vintagestory.API.Datastructures'''.
== Use in API ==
== Use in API ==
Within the API, TreeAttribute is often employed to store persistent entity data, and to store data extracted from JSON files.<br>
Within the API, TreeAttribute is often employed to store persistent entity data, and to access data extracted from JSON files.<br>
'''TreeAttribute''' is often supplied as the interface '''ITreeAttribute'''.<br>
'''TreeAttribute''' is often supplied as the interface '''ITreeAttribute'''.<br>
== Example in code ==  
== Example in code ==  
<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">