How to Access XML Data in Unity - Game Development Tutorial

preview_player
Показать описание
In this tutorial video, I show you how you can access data from an XML file in Unity. You might want to do this if you have a game with several items in it. You can use the XML file to store all this data and easily access all of it by simply looking up XML tags. Let me know if you have any questions. Enjoy!

Time Codes:
0:00 - Intro
0:46 - Demonstration of end goal
2:51 - Overview of Unity Project
4:30 - Overview of XML File
6:32 - UI Controller Script
6:59 - InventoryItem Class
12:04 - Accessing The XML File in C#
13:34 - Selecting All XML Nodes With a Specified Tag
15:22 - Selecting All XML Nodes With a Specified Attribute
16:43 - Selecting a Single Node With a Unique ID
17:35 - Finishing up the Setup in Unity

Download the project I use in this video:

Please 'Like' this video and share it with anyone who is interested in video game development.

Subscribe to the channel for much more independent video game developer related content including tutorials, design breakdowns, industry events, VLOGs, and much more fun stuff!

Links:
Blog:

My Game Development Studio's Website:

My GitHub:

My Setup:

As an Amazon Associate I earn from qualifying purchases.

#XML #Unity #UnityTutorial
Рекомендации по теме
Комментарии
Автор

The first tutorial in 2 years that ever made sense.
A thousand blessings upon your household.

stitchfinger
Автор

Awesome you helped me a lot! Exactly what i'm looking.

marwincsantos
Автор

Great tutorial just what I needed to learn for my project :) Lot's of different use cases covered too! They made me wrap my head around the interaction between xml and C# :) Subbing !

maxdolmans
Автор

Hey kinda 4 years late. But I have a question. I usually use xml files for animations. Could I possibly use xmls for unity? Like mabye a script or something?

Frazcaideadlol__
Автор

Leaving a comment..Caz this tutorial helped me a lot!!!

sanaasyed
Автор

Thanks for tutorial! Best! Very helpful!

TechLevelGames
Автор

man this is what i actually searching for thank you ..
i was searching all day and scrolled down way too much till i found your video, this video need to be on top actually haha

now i just wanna know is there any tutorial on modifying the data? in example if the weapon have durability etc that will decreased, is it using serializable ?

thx you

boismd
Автор

0:48 to skip the random unnecessaryfacecam

TheOriginalElkstone
visit shbcf.ru