I like your tutorials a lot. They are allready short but i feel like you could shave even more off, i mean all this was is basicly a drag and drop. If you feel like you are one of the bravest, boldest and Mostest Courageous Developers you could go that!! Everyone loves super short totorals!
Love it! "This is only for advanced level 3 developers: Drag it into your file area to create a prefab. Then to use the prefab, drag it from the file area into the scene." Yup, it really is that simple.
If I generate a model using code, say a race track, and I want to save that procedural track as a default track the player can use. How can I save it? Since things you do a Run time usually don't save. I will make my question even easier. Let's say I create a plane at run time using code. How do I save it to use that plane? Also thank you so much for the videos. They really have helped a lot.
For something like that I wouldn't really use anything with Unity itself, I'd say to use .Net's BinaryWriter and BinaryReader classes to do it yourself, I guess you can use the JsonUtility class or something similar to serialize it, maybe System.Linq has something for that? but I do think using the binary classes is best, after all, you understand what your custom data is for, you know how it works and you can probably come up with a good way to serialize it, and I specify the binary classes because that means writing the data into a file raw, as in the same way it's stored in memory, which is simply taking out unnecessary steps. Anyway, I don't know the architecture of your procedural tracks, so I can't give you an exact answer on how to go about it, but a simple example should point you into the right direction, also do keep in mind, this is .Net, not Unity, Unity *uses* .Net, so you won't see MonoBehaviours or anything in the example since that's kind of irrelevant generally, then again, don't know the architecture of your procedural tracks, so if you need any further help you can hit me up on Discord: @dvwf#1375 If you're concerned about file sizes, you can look into compressing your data in some way, something else to keep in mind, is that when you use these classes, each call to the Write and Read methods are extra CPU cycles, if your data is large or complex and you wanna cut on loading and/or writing times, you can look into arranging your data manually in an array of bytes, in memory, and then use File.WriteAllBytes and File.ReadAllBytes, but if you don't need that necessarily don't bother with it and use the binary classes. Here's an example on how you'd use the binary classes, this is just one way to go about it, you could put the loading code in a constructor, or do an static method that returns a new instance of MyAmazingData, but that's besides the point public struct MyAmazingData { public string e_name = "My amazing instance :)"; public float[] e_weights = 1.0f; public bool e_amazing = true; public void Save(string path) { using(var fs = new FileStream(path, FileMode.Open) { using(var bw = new BinaryWriter(bw)) { bw.Write(e_name); bw.Write(e_weights.Length); for(int i = 0; i < e_weights.Length; ++i) bw.Write(e_weights[i]); bw.Write(e_amazing); } } } public void Load(string path) { if(!File.Exists(path)) throw new Exception("File does not exist."); using(var fs = new FileStream(path, FileMode.Open) { using(var br = new BinaryReader(bw)) { e_name = br.ReadString(); int len = br.ReadInt(); e_weights = new float[len]; for(int i = 0; i < len; ++i) e_weights[i] = br.ReadSingle(); // Because float encapsulates all types that use the floating point technology, like decimals and doubles, the accurate term for 32 bit floats is a single, because it's the standard 32 bits, likewise, 16 bit floats are halfs, confusing, I know e_amazing = br.ReadBool(); } } } }
I- I don't think I can manage this... I'll have to give up on unity -.- Btw, could you add the timer again? Those are always kinda fun to see, like, "wait only 2 seconds?"
You got this man-! And, I'll try and see if I can bring it back after the next few videos. I sort of left it out on purpose just to make sure beginners didn't feel stressed out or in a rush lol
I always thought that it would be wise to have an .obj file that functions much like kit bashing within blender for Unity so that we could make many original variant prefabs within unity instead of constantly building from scratch or "needed to be edited" files.
We have prefab variants, I think they're new, not sure, but they're there, IIRC you just put a prefab in your scene, override something without unpacking it, and drag it to your Project window/file manager.
I've only ever "lightly" used Unreal, but I do believe they all share a lot of Fundamentals. There are definitely reasons for picking one over the other, but most of them are set up very similar. Think of it like this, it's the same way just about every 3D software feels similar. Maya, Blender, and Houdini are all different. But, they 3d model with faces, lines, and vertecies. They all UV Map and texture. They all use rigging and a skeleton for weight painting. And, they all use key frames for animation. The only differences are in the details. They all focus on different things. Maya has features that make it more efficient for animating characters. However, Blender has more intuitive features for polymodeling. Houdini has amazing features for special effects and procedural modeling or environment creation. So, the user should pick the one that has strengths in their field of interest -
For me, it really comes down to what you feel most comfortable with, they all serve essentially the same purpose, the differences are, well, the details of course! Part of it is indeed having focus on different aspects, there's also the inner workings of the engines, the most dramatic example I can think of is UE5 having this insane feature for loading absolutely massive models (massive as in dense) allowing artists to not have to optimize models by having nice topology, a reasonable amount of tris and using normal maps for details, while Unity's new HDRP, to my understanding is just programatically optimized to make the most of what it does have, so that you don't need an insane SSD or a flagship GPU to game at good render settings and resolutions. There's also the user interface, for instance, Unity uses primarily C# for scripting, and there's also Bolt, which was a paid visual scripting package for the engine, that Unity bought a while ago and made free for all, and there's also Unity's own experimental visual scripting tool that works with the C# Jobs and the Burst compiler, meanwhile, Unreal Engine uses C++ for everything, which is an absolute pain oh my god why do I have to use YOUR string class for everything, Epic Games! Oh my god let me use Microsoft's , it's much nicer! A̵a̸a̴Ȧ̵̝ȁ̵̪A̵̱͝a̷̗͋À̶̭a̷̠̎͛́̕ä̷̢͎̱̘́A̷̖̍̃̎a̵̠̹̠͊A̸̍͜a̴̡͆̏́a̴̡̛̋̆̉̅̍̚͘A̶̼̮̹̘͌̒̂͊̇̈́͜á̸̝̮̭͇̪̟̫͈͐̑́͆Ḁ̴̡̣̳̫̈́́̈́̇á̴̡̜̘͎̈́̄̔͊͘ oh and also, UE also has visual scripting, they call their implementation Blue Prints, and they seem to be much nicer than C++, although apparently they're much less performant. The concepts translate, definetely, an Actor in UE is still a game object, a GameObject in Unity is well, obviously still a GameObject, there are indeed some things that are very different, even to the point where it doesn't translate, or are straight up missing, but at the end of the day, it's still a game engine. Anyway that's just what I think on the topic, I kinda just spoke my mind out without much thought, thanks if you read through all that :)
Ah yes, prefabs, the ultimate challenge to any developer, the very hardest part, it's like the insanely hard mode of game development, I cannot for the life of me figure it out, I need to put a quantum CPU in a PCI-E card to be able to use prefabs to their fullest p o t e n t i a l ! Ok but jokes aside, that really is all there is to it, there's prefab variants too, where you can make a prefab that follows whatever change you apply to another prefab has but it has one or more things that are different, like say it's an spaceship of a different color! Instantiating them is quite trivial, you just need a reference to it, you use a GameObject variable, you can also use UnityEngine.Object (not to be confused with System.Object, if you want an explanation just tell me) because it could be something like an ScriptableObject which you *really* don't wanna Instantiate, you can drag prefabs and objects in your scene (but don't do that, it can get funky when you run another scene if your object isn't set to not be destroyed on load), anyway, once you have your reference you can just use the Instantiate method like so: public GameObject e_prefab; void OnTriggerEnter(Collider col) { if(col.CompareTag("Instantiater") Instantiate(e_prefab, transform.position, transform.rotation); } You can optionally provide a position and rotation in world space, as well as transform to be the parent object, for more information refer to the official documentation: docs.unity3d.com/ScriptReference/Object.Instantiate.html
I try to be helpful to people who seem nice -also just to clarify, I'm a girl pleasedontdontdoajokeaboutmisgenderingihatethatmemehahahahaha *oh no i hope it doesnt look like im trying way too hard to make it not seem like a big deal :) being an introvert is fun!-
Does anybody know if there is a way to get rid of the graphics setting menu that come up when you start your exported game. Can I make it launch the game directly without that menu?
I have a feeling that a developer's level goes up to at least 100 and 10 is required to make a good game. Also, I know it was for a joke but creating prefabs is just about the easiest thing you can do, the hard part comes from making the original object work well enough individually that it works for your purposes like enemies in any combat moderate game or higher. That said with what I said I would be at level 5 just about on the assumed scale earlier in the comment.
Also if anyone feels offended by me saying creating prefabs is easy but you just learned about prefabs, I didn't mean it that way. Only about a year ago I could hardly use Unity to make a moving square without referance.
Legend has it, there's 2 whole 16GB RAM sticks in his computer that got stuck in storing those tabs, and they just won't get overriden by anything the CPU needs to store, and they won't get wiped when loosing power either, he discovered RAM burn-in!
You make really good videos but something about your thumbnails puts me off. Since these are informative videos i'd keep it simpler with the colors and fonts of the text. Often times the video length numbers cover the text in them too. let's take this thumbnail for instance: i.imgur.com/aUobGa4.png it looks very confusing, the tilted cube resembling the unity logo is there, but i didn't catch that at a glance, the arrows of multiple colors are distracting me from the text so even if they're on topic it still doesn't really help me understand what this is all about, then the text itself reminds me of don't dead open inside memes, all 3 words are of a different color, unity is in the middle so my brain will automatically read that as position unity variables which still doesn't make the sense it should by now since my brain has passed on from just looking at the picture to actually reading text, and to add to the mix the last word is partly hidden by the video length numbers. It's only when I actually read the title (which most people won't ever do) when i clearly understand what this video is about. If anything at least make it so the topic of the video isn't split in half by the name of the software or subject. You definitely know how important video thumbnails are to get people to click on them, but this is just one man's opinion, hopefully this feedback can be of help to you. Cheers!
Hey Freeway, thank you for taking the time to write such a well thought out comment and not a rant. Since you put genuine effort into this comment. I feel It warrants a complete response. I don't actually disagree with anything you said. The truth is the thumbnail is often the final thing I create in the video process. It usually takes me an hour or two to figure out what to put in it. I usually brainstorm with a bunch of words that I feel relate to the topic and then depending on how well they are legible and fit into the thumbnail I try to pick three that make sense. It's something I'm constantly trying to improve, and I'm going to take your advice to heart and try to make it a little less cluttered or chaotic when possible. In the future I'm hoping to save up enough on Patreon to hire someone to make the thumbnails for me. Someone who has the luxury to spend all day thinking about the "BEST" thumbnail for the video. Until then, thank you for putting up with my thumbnails so far :)
We're almost done with the Unity Series now!
Just a few more small things I wanna share, and then I'll show you a few ways to put things together - :)
Love your voice and enthusiasm. The short videos are also great for those of us with attention span issues.
I like your tutorials a lot.
They are allready short but i feel like you could shave even more off, i mean all this was is basicly a drag and drop. If you feel like you are one of the bravest, boldest and Mostest Courageous Developers you could go that!! Everyone loves super short totorals!
Love it! "This is only for advanced level 3 developers: Drag it into your file area to create a prefab. Then to use the prefab, drag it from the file area into the scene." Yup, it really is that simple.
Jeez, give me a minute teach; I just finished studying the last 5 vids!!! Lol. JK, never stop. I look forward to every upload religiously.
After 2 hours forum and several scripts... finally have it .. thanks a lot :P :D
That was a lot easier to make than I have seen others do
NOT A PROBLEM! Glad to hear that!
Fuck I didn't know that thanks 😂, I guess I need to be lvl 3 developer to learn this
I am just patiently waiting for a royal skies tutorial on unity’s animation system.
especially for how to treat the alembics animation file
This was edited so good and funny haha
Haha! April 1st jokes are always hits m..
Wait a minute.
Wow you are 1 minute early! so FAST!
One of the most important concepts in Unity. And how to use those vars in code.
Nice
If I generate a model using code, say a race track, and I want to save that procedural track as a default track the player can use. How can I save it? Since things you do a Run time usually don't save. I will make my question even easier. Let's say I create a plane at run time using code. How do I save it to use that plane? Also thank you so much for the videos. They really have helped a lot.
For something like that I wouldn't really use anything with Unity itself, I'd say to use .Net's BinaryWriter and BinaryReader classes to do it yourself, I guess you can use the JsonUtility class or something similar to serialize it, maybe System.Linq has something for that? but I do think using the binary classes is best, after all, you understand what your custom data is for, you know how it works and you can probably come up with a good way to serialize it, and I specify the binary classes because that means writing the data into a file raw, as in the same way it's stored in memory, which is simply taking out unnecessary steps.
Anyway, I don't know the architecture of your procedural tracks, so I can't give you an exact answer on how to go about it, but a simple example should point you into the right direction, also do keep in mind, this is .Net, not Unity, Unity *uses* .Net, so you won't see MonoBehaviours or anything in the example since that's kind of irrelevant generally, then again, don't know the architecture of your procedural tracks, so if you need any further help you can hit me up on Discord: @dvwf#1375
If you're concerned about file sizes, you can look into compressing your data in some way, something else to keep in mind, is that when you use these classes, each call to the Write and Read methods are extra CPU cycles, if your data is large or complex and you wanna cut on loading and/or writing times, you can look into arranging your data manually in an array of bytes, in memory, and then use File.WriteAllBytes and File.ReadAllBytes, but if you don't need that necessarily don't bother with it and use the binary classes.
Here's an example on how you'd use the binary classes, this is just one way to go about it, you could put the loading code in a constructor, or do an static method that returns a new instance of MyAmazingData, but that's besides the point
public struct MyAmazingData
{
public string e_name = "My amazing instance :)";
public float[] e_weights = 1.0f;
public bool e_amazing = true;
public void Save(string path)
{
using(var fs = new FileStream(path, FileMode.Open)
{
using(var bw = new BinaryWriter(bw))
{
bw.Write(e_name);
bw.Write(e_weights.Length);
for(int i = 0; i < e_weights.Length; ++i)
bw.Write(e_weights[i]);
bw.Write(e_amazing);
}
}
}
public void Load(string path)
{
if(!File.Exists(path))
throw new Exception("File does not exist.");
using(var fs = new FileStream(path, FileMode.Open)
{
using(var br = new BinaryReader(bw))
{
e_name = br.ReadString();
int len = br.ReadInt();
e_weights = new float[len];
for(int i = 0; i < len; ++i)
e_weights[i] = br.ReadSingle(); // Because float encapsulates all types that use the floating point technology, like decimals and doubles, the accurate term for 32 bit floats is a single, because it's the standard 32 bits, likewise, 16 bit floats are halfs, confusing, I know
e_amazing = br.ReadBool();
}
}
}
}
This great but what if want to change game objects in game how would I do that
I- I don't think I can manage this...
I'll have to give up on unity -.-
Btw, could you add the timer again?
Those are always kinda fun to see, like, "wait only 2 seconds?"
You got this man-!
And, I'll try and see if I can bring it back after the next few videos. I sort of left it out on purpose just to make sure beginners didn't feel stressed out or in a rush lol
I always thought that it would be wise to have an .obj file that functions much like kit bashing within blender for Unity so that we could make many original variant prefabs within unity instead of constantly building from scratch or "needed to be edited" files.
We have prefab variants, I think they're new, not sure, but they're there, IIRC you just put a prefab in your scene, override something without unpacking it, and drag it to your Project window/file manager.
yes
I love you.
Can all the unity tutorial concepts be used for other game engines like unreal or godot? (With different code ofcourse)
I've only ever "lightly" used Unreal, but I do believe they all share a lot of Fundamentals. There are definitely reasons for picking one over the other, but most of them are set up very similar.
Think of it like this, it's the same way just about every 3D software feels similar. Maya, Blender, and Houdini are all different. But, they 3d model with faces, lines, and vertecies. They all UV Map and texture. They all use rigging and a skeleton for weight painting. And, they all use key frames for animation. The only differences are in the details. They all focus on different things. Maya has features that make it more efficient for animating characters. However, Blender has more intuitive features for polymodeling. Houdini has amazing features for special effects and procedural modeling or environment creation. So, the user should pick the one that has strengths in their field of interest -
For me, it really comes down to what you feel most comfortable with, they all serve essentially the same purpose, the differences are, well, the details of course!
Part of it is indeed having focus on different aspects, there's also the inner workings of the engines, the most dramatic example I can think of is UE5 having this insane feature for loading absolutely massive models (massive as in dense) allowing artists to not have to optimize models by having nice topology, a reasonable amount of tris and using normal maps for details, while Unity's new HDRP, to my understanding is just programatically optimized to make the most of what it does have, so that you don't need an insane SSD or a flagship GPU to game at good render settings and resolutions.
There's also the user interface, for instance, Unity uses primarily C# for scripting, and there's also Bolt, which was a paid visual scripting package for the engine, that Unity bought a while ago and made free for all, and there's also Unity's own experimental visual scripting tool that works with the C# Jobs and the Burst compiler, meanwhile, Unreal Engine uses C++ for everything, which is an absolute pain oh my god why do I have to use YOUR string class for everything, Epic Games! Oh my god let me use Microsoft's , it's much nicer! A̵a̸a̴Ȧ̵̝ȁ̵̪A̵̱͝a̷̗͋À̶̭a̷̠̎͛́̕ä̷̢͎̱̘́A̷̖̍̃̎a̵̠̹̠͊A̸̍͜a̴̡͆̏́a̴̡̛̋̆̉̅̍̚͘A̶̼̮̹̘͌̒̂͊̇̈́͜á̸̝̮̭͇̪̟̫͈͐̑́͆Ḁ̴̡̣̳̫̈́́̈́̇á̴̡̜̘͎̈́̄̔͊͘ oh and also, UE also has visual scripting, they call their implementation Blue Prints, and they seem to be much nicer than C++, although apparently they're much less performant.
The concepts translate, definetely, an Actor in UE is still a game object, a GameObject in Unity is well, obviously still a GameObject, there are indeed some things that are very different, even to the point where it doesn't translate, or are straight up missing, but at the end of the day, it's still a game engine.
Anyway that's just what I think on the topic, I kinda just spoke my mind out without much thought, thanks if you read through all that :)
Thank you, guess I’ll stick with godot
Ah yes, prefabs, the ultimate challenge to any developer, the very hardest part, it's like the insanely hard mode of game development, I cannot for the life of me figure it out, I need to put a quantum CPU in a PCI-E card to be able to use prefabs to their fullest p o t e n t i a l !
Ok but jokes aside, that really is all there is to it, there's prefab variants too, where you can make a prefab that follows whatever change you apply to another prefab has but it has one or more things that are different, like say it's an spaceship of a different color!
Instantiating them is quite trivial, you just need a reference to it, you use a GameObject variable, you can also use UnityEngine.Object (not to be confused with System.Object, if you want an explanation just tell me) because it could be something like an ScriptableObject which you *really* don't wanna Instantiate, you can drag prefabs and objects in your scene (but don't do that, it can get funky when you run another scene if your object isn't set to not be destroyed on load), anyway, once you have your reference you can just use the Instantiate method like so:
public GameObject e_prefab;
void OnTriggerEnter(Collider col)
{
if(col.CompareTag("Instantiater")
Instantiate(e_prefab, transform.position, transform.rotation);
}
You can optionally provide a position and rotation in world space, as well as transform to be the parent object, for more information refer to the official documentation: docs.unity3d.com/ScriptReference/Object.Instantiate.html
Thanks for sharing man! Again, I learned new stuff from an incredible comment :) Much appreciated man -
I try to be helpful to people who seem nice -also just to clarify, I'm a girl pleasedontdontdoajokeaboutmisgenderingihatethatmemehahahahaha *oh no i hope it doesnt look like im trying way too hard to make it not seem like a big deal :) being an introvert is fun!-
billion $ to the person who created drag and drop
Does anybody know if there is a way to get rid of the graphics setting menu that come up when you start your exported game. Can I make it launch the game directly without that menu?
first
I have a feeling that a developer's level goes up to at least 100 and 10 is required to make a good game. Also, I know it was for a joke but creating prefabs is just about the easiest thing you can do, the hard part comes from making the original object work well enough individually that it works for your purposes like enemies in any combat moderate game or higher. That said with what I said I would be at level 5 just about on the assumed scale earlier in the comment.
Also if anyone feels offended by me saying creating prefabs is easy but you just learned about prefabs, I didn't mean it that way. Only about a year ago I could hardly use Unity to make a moving square without referance.
Hey RoyalSkiesLLC, While you’re reading comments, I just want to remind you to close all your unused tabs!
Legend has it, there's 2 whole 16GB RAM sticks in his computer that got stuck in storing those tabs, and they just won't get overriden by anything the CPU needs to store, and they won't get wiped when loosing power either, he discovered RAM burn-in!
You make really good videos but something about your thumbnails puts me off. Since these are informative videos i'd keep it simpler with the colors and fonts of the text. Often times the video length numbers cover the text in them too.
let's take this thumbnail for instance: i.imgur.com/aUobGa4.png
it looks very confusing, the tilted cube resembling the unity logo is there, but i didn't catch that at a glance, the arrows of multiple colors are distracting me from the text so even if they're on topic it still doesn't really help me understand what this is all about, then the text itself reminds me of don't dead open inside memes, all 3 words are of a different color, unity is in the middle so my brain will automatically read that as position unity variables which still doesn't make the sense it should by now since my brain has passed on from just looking at the picture to actually reading text, and to add to the mix the last word is partly hidden by the video length numbers. It's only when I actually read the title (which most people won't ever do) when i clearly understand what this video is about.
If anything at least make it so the topic of the video isn't split in half by the name of the software or subject. You definitely know how important video thumbnails are to get people to click on them, but this is just one man's opinion, hopefully this feedback can be of help to you. Cheers!
I read the titles :(
-im joking, i know most people wont do that, or at least theyll do it only after looking at the thumbnail, im weird haha help-
Hey Freeway, thank you for taking the time to write such a well thought out comment and not a rant. Since you put genuine effort into this comment. I feel It warrants a complete response. I don't actually disagree with anything you said. The truth is the thumbnail is often the final thing I create in the video process. It usually takes me an hour or two to figure out what to put in it. I usually brainstorm with a bunch of words that I feel relate to the topic and then depending on how well they are legible and fit into the thumbnail I try to pick three that make sense. It's something I'm constantly trying to improve, and I'm going to take your advice to heart and try to make it a little less cluttered or chaotic when possible. In the future I'm hoping to save up enough on Patreon to hire someone to make the thumbnails for me. Someone who has the luxury to spend all day thinking about the "BEST" thumbnail for the video. Until then, thank you for putting up with my thumbnails so far :)
"2 minutes" video is 1 minute long