Hello, guys.
Welcome to the video.
Uh, in this one, we're going to make a build of the game, and we're going to publish it on the website.
So you can just send the link to your friends so they can play the game.
And if you never did it before, the task is much simpler than you think.
My game is not entirely ready.
I still need to make some levels, but I'm going to do that later.
As of now, I just want to show you how to make a build and how to publish.
Okay.
It's pretty simple.
Uh, so, uh, let's say your levels are ready.
You did prepare the game.
Everything is good to go.
And then we're going to go to file, uh, build profiles over here.
You need to choose the platform that you want to build for.
And you can just build for windows by clicking build.
And then you would have to find the folder for it and make a build.
And maybe let's quickly do that.
I'm going to go to desktop and I'll make um.
Older.
And former build.
Okay let me click it select folder I'm going to save everything.
And unity will make a build that you can use to play the game for the website.
It's going to be a little bit different and I'll just show you how to do that and give me a.
All right.
There was an error message in a compiler.
Let's see.
What is it?
Why do we have it here?
Interesting.
Uh, let me try again.
Can I go to file?
Build.
All right.
This is a good error.
All right.
This is a good one.
We need to open this.
And we need to comment out these lines of code because these are working only for unity editor I'm going
to comment this out and hopefully now it should be good.
Let me try again.
Build.
All right and build a successful.
Here is the folder with a build.
I can click the Excel file and game will open and I can play the game.
Yeah.
Very nice.
Now, regarding the publishing the game on the website, you're going to need a browser in which you
have to type each.io.
This is a website for indie developers where people publish their games.
You can share your achievement, you can ask for feedback, and so on.
You can see there is some game published right now, and there are much more games to find that you
can try and see what other people do.
Also.
By the way, there is a Game gems very useful thing to attend, so maybe find a game gem.
Try that one as well.
Now how do we publish a game?
We need to make an account and I trust that part to you.
You can make an account yourself.
Then we need to go to dashboard over here.
And then you just need to click Create New Project.
I have this one for Pixel Adventure.
I'm just going to remove it because I don't need it anymore.
How do I maybe it's not published.
Delete game.
Yeah, I'm going to delete it because this is the old one.
I don't care about that.
Now let's do create new project.
And over here you'll have to fill information according to your preferences.
It's not that big of a deal.
You can set up a game trailer cover image.
So many things that you could do.
I'm going to show you the most important things and others and others.
I trust that part to you.
Okay, so here is the title.
Uh, then there is a link for that and tagline.
If you want to add some text then you need to choose what is it, is it an asset tool?
Whatever.
And this is a game.
Then you need to choose the kind of project.
If you choose downloadable then you can just use a PC build just like we made like just now.
But I want to show you how to make it playable inside of the browser.
So we have to change it to HTML over here.
And you can see it says you have a zip or HTML file that will be played in the browser, and that is
what we're going to have.
Then you're going to choose release status.
Pricing if you want, and then you just need to upload the file.
So this is what we're going to do.
We're going to make this file.
Let's go back to unity.
And over here you can see that these things are not available.
And we need this tab over here the web module.
So we're going to install it with Unity Hub.
Uh, we just scrolling down and there is this WebGL build support.
All right, I have it installed now.
We need to go back to unity and we need to switch it.
I guess it's better to restart unity itself.
So I'm gonna clear everything.
I'm going to close unity and I'm going to restart the project.
All right, here's the project again.
Now it is switched to web version, I believe.
Now it is not yet.
We need to click web over here and we need to do switch profile.
You don't have to worry about making a mistake.
I guess if you do worry, you can make a copy of the project, or you can use my project that I attached
in the end of the last section.
Okay, I'm going to click switch now.
It should be fine.
We only want to go to player settings and double check things that we need to change.
For example, you can change company name, the product name version, you can set icon, cursor and
other things.
Uh, for example, we can set resolution and we can choose the template for WebGL.
This basically to understand better you should try them all and with different version.
As of now you can just set default resolution to something like that.
Or maybe even better.
Let me check.
Um, let's do 1280 by 720.
Yeah, I'm going to use this resolution because this will allow me not to cover up entire screen when
we just test in the game.
But if you want, you can use full HD.
It's fine.
Now you can adjust the splash screen if you want.
This is the image that you see before the game starts.
Uh.
Over here.
You can see it shows made with unity and you can add some custom stuff and unity logo.
You can set up the things on your own.
I'm not going to explain every step because this one is pretty simple one just self-explanatory.
Other settings.
Well, for 2D game that already has pre-made graphics, we don't really need to change anything.
It's going to be okay.
Uh, yeah.
So this is good.
Let's close it and let's go and do build.
We need to find a place for it.
I'm going to maybe just use.
Uh, my project with courses.
I'm going to make a new folder.
Let's former you and I'm going to type web so I can see the difference.
Let me click select.
All right.
It took pretty long for me, five minutes, but it worked.
So I have the build.
Now.
Let me open the folder.
There is this platform or new web folder which contains a build.
And now to make it work we need to make it as a zip archive.
I do that by using a WinRAR, and you can just go and do add to archive and make it as a zip.
If you have other way to do that, you can or you can just download WinRAR from Google.
Okay.
Let's do okay.
Now I have a zip of the game and I can open my browser, click upload files.
Need to find that there is this web zip.
I'm going to click open.
It's going to add a file there.
Uh, this file will be played in the browser.
Then you can add, uh, viewport dimensions, so I did.
And this.
I think it should be fine.
You can change settings over here.
Uh, but I think it should be fine.
Frame option, mobile friendly.
These things.
It's up to your game.
I think I will add full screen button.
Okay, now you can add details about the game tags, links, and some other things that you need.
I think.
Yeah, I'm going to the draft.
I'm not going to make it public.
Let's save everything now.
It will open the page with a game.
You can click Run Game and there is my game.
I'm going to mute it.
You can do full screen if you like.
Uh, it does not show in a full screen because I did settings of 1280 by 720 in unity.
So you would have to change that to a higher resolution.
But I think it's fine to play on player normal level one and you can play the game.
Complete levels.
Go further.
And it's supposed to save the progress as well.
So if I refresh the page and go to run game, I can go further.
I can click play one player, normal one player and choose another level that was saved.
Okay.
Very good.
So that's how you do it.
And basically that's all what you need.
Yeah.
Congratulations.
Let's go to the next video.
I have a big thank you to say okay I'll see you there.