Please make more videos, and the editor tutorial if you can that would be splendid. I want to know about Custom Editor and I'd love to hear it from you.
I find the editing and post-production far too distracting. I look to tutorials like this for information, not entertainment. I want to hear what you have to say, not pop culture references.
Good stuff! I like the editing, keeps it light and easier to digest. Yeah I'd be up for editor code. What I'd be most interested in is how you'd setup a codebase for production, something mid sized like an indie pc game. Specifically I want to understand how you use interfaces and why, and how to avoid things like zenject and singletons. Also curious about your take on UniRx and DOTS. Thanks for this man!
Really glad to see you started your own channel, Jason! Loved your contributions to Jason Weimann's videos, always got interesting stuff to add to the conversations.
I would love to see more tutorials from you. About anything really... You seem very experienced with industry and know a lot about shortcuts/easier ways to do stuff.
Neat, this is surely going to be useful at some point! Next level: How do I automate file population? ;) Btw, I notice your videos' audio is not quite synced up -- if you use Davinci Resolve, it can auto-sync your high res audio track based on the video's original audio track (I'm sure Premiere must have something similar).
Well I do personally have some apis I use that actually generate the prototype data, it can create fake users, ai user faces and random photos... maybe that could be another video when I have time :) As for the audio, that's strange. It seems in sync for me, and the audio is recording directly through the camera as a source, so that IS the original source track. Then again premiere was crashing for me this week so it could have gone a bit wrong, I'll keep an eye on it for the next one!
@@JasonStorey Sounds interesting! BTW, I like your topic choices so far, they're a bit more niche. Would be great to see more around advanced architecture topics as well. Re audio: That is strange! I asked my partner and he doesn't see it either but I swear the video is slightly delayed. I only even commented on it because I noticed it in multiple of your videos. But hey, if no one else sees it, no need to fix anything, I'll survive. :)
I really like this approach of making data easier to access. You can even put these files behind a web server and dynamically update them without having to have the players download a new game client. Changing that damage stat on a sword no longer requires validating an entire new release! One suggestion: Unity includes the Newtonsoft JSON library already for you which can handle serializing and deserializing complex types for you. Instead of splitting text files manually which can break when you add another field, using some structured data like JSON, XML or YAML can make this more robust and less likely to trigger weird and confusing warnings when a data file is incorrectly changed or your type gets updated. I believe that code to do this will be shorter than the manual parsing version as well! For example: var lines = JsonConvert.DeserializeObject(_file.text); Should be all you need when converting your Items data 😀
I completely agree! In fact I use Newtonsoft JSON for most of my projects, but in unitys documentation they do actively caution you against relying on the version they include as they only promise it is there for editor tooling and not always guaranteed, also while I would use json/bson for data myself as I am comfortable editing it, when it comes to giving something to non-tech people, asking them to just type some words in a file with commas between them is easier to explain and reason about, so for user facing stuff I often use plaintext/flat files. (though secretly I will often parse what they give me, model it as a json DTO and use that myself. )
Very good explanation of why arrays aren' t the best approach when comes to data editing and reading. Also thank you for teaching a new for me at least class the textasset, but I tried using also something new that I saw the required attribute and the visual studio compiler wasn' t recognizing it, it was only displaying me the requirecomponent attribute. Does anyone know why I couldn' t access it ?
using notepad to set values in an array that is a good way and gives instant feedback, clearly helps me very quickly make changes to the data in my script I mean unity shouldn't have given the option to inspect these have you not seen scriptable objects?! I mean like, they do exactly what you're doing but gives more freedom lol
Man, why did you stopped your awesome videos... I was ware of txt files but I never thought to use them in the way to fill content of the objects!!! Thank you so much and thumb up!
Using a comma is not a good idea, as more or less everyone but the english speaking world and former commonwealth uses commas as a decimal point. Now if someone wants to write a float value in their native way or using non english text-software, Unity will treat that float as two ints. The better way is to use a semi-colon (;)
So technically I agree, though in fact I would use a | instead of a ; The truth is though, if you are delimiting values for data transfer it is usually serialization as a goal to a) compress it for efficiency b) transfer it between systems in an easy format, c) make it human editable. Unless I was being precious with performance in a real enterprise scenario I wouldn't use flat files at all, I would use a structured data format like bson, json or at a push yaml. But the point of this exercise is to take a relatively straightforward set of values as a client request and populate an array. the format doesnt matter as much as the client intent. you can easily "make your own format" as long as you agree with the client about how they get the ideas out of their head. In this case for simply outlining a few item properties this is not long term persistence, it is automating data entry. If this was a bigger problem likely to change regularly I would as far as to build an external GUI application in WPF, MEAN stack or Electron to allow a client to generate these files from a wizard form.
@@JasonStorey I know its a toy example, I just myself had to learn this the hard way. I have to admit that i'm old school, as I'm using excel as a wizard. When converting a sheet to a CSV file, it behaves weirdly to commas. Another issue is that I switch between dots and commas all the time depending on the software, so I might accidentally write a comma instead of a dot. I would rather have a parsing error than a split number that might go under the radar for a long time
Uh... Exactly how low is the average Unity user's programming level..? The fact that "Load text from files" is being hailed as a life-saver in the comments is kind of worrying. Nice video though, the editing is clean and the information is presented clearly. Only thing I could see being improved fairly easily at the moment is the presentation of code: instead of showing a sped-up video of you writing out the code, showing code snippets and shortly explaining them à la Sebastian Lague would probably make for a more dynamic result.
Hey, Iove the streams you do with Infallible Code, and I am hyped for what you can come up here. But please keep the videos as clean as you keep your code clean... Are those special effects really adding to the underlying message of the video? One or Two might spice it up, but in this video it has been too much ;)
This is amazing. The hard thing about this is as a person who learnt unity and C# on my own, how would I even know these functions and options exist until I come across this. Amazing work tho!
So what's the difference between this and using scriptable objects for data loading? I used scriptable objects in order to import level data. But I didn't really understand them that well. I just know that I read the data and create objects out of that data. Then I create assets from those objects. But why is the ScriptableObject class in there? What does it do?
Late to the party but thanks for the useful video! Any thoughts on loading larger quantities of data (e.g. big datasets generated by another process outside of unity ?)
I'm reading Game Programing Gems and on the first chapter they talk about how you should use text files to not scare away designers. Great to see it implemented in Unity
How should we apply our custom components or script automatically? I mean we drag the fbx in the hirarachy again and again and each time we have to add those compoennts. Is there any good approach video ?
The bad thing is, unity loads that text asset into the memory for full apps lifetime even though nothing accesses it. Maybe deleting that textasset reference after the array creation might work better
I like these kinds of videos. It's easy to initially do the array by hand in Unity but you're right, it requires opening Unity, it's not portable, etc. It's nice when someone says 'there is just a different/better way that is easier long-term and way less overhead' appreciate the video.