Now you can see one more template as a "UnityWebGL" now select it and build to see your own loading screen. Inside Unity open "Player Settings" for WebGL and click "Resolution and Presentation" tab. Now copy your "index.html" file and TemplateData folder and paste inside "UnityWebGL" folder and done we achieved it :) Create one more folder and give it a name what ever you want. Create a folder inside "Assets" folder in your Unity project. Let's insert this into the Unity so we can select this template and use for builds. Now we successfully complete our "Loading Screen Template". Just be careful about "background-image: url(loadingProgress.png) " you have to write exact names for textures (locates on "TemplateData" folder). I won't explain everything in this file so if you have a question you can google about css or send a message to me. This is our css file which allow us to place our textures and texts in appropriate places. moz-box-shadow: 0 10px 30px rgba(0,0,0,0.2) īackground-image: url(loadingProgressBackground.png) īackground-image: url(loadingProgress.png) We need to change it as a WebGL template format to use it from Unity inside. Okay we have one thing left to do with our "index.html" file. Now add these lines to your "index.html" file just under the canvas> tag: Preparing Weapons. Now I will add their reference to my "index.html" file so I can reach them from. I will add my loading screen a background, progress bar and a text element. Unity web player build full#Now I want to make my WebGL build fit as a full screen in every resolution (this works also if you are building for a "Facebook Canvas"). Remove these lines from your "index.html" file UnityWebGL Now let's start with removing bottom bar. Now when we finish creating template we won't see "Unity Logo" or "Full Screen Logo" on the bottom of the loading screen. Open your "index.html" file with text editor. We will change "index.html" file and TemplateData folder to customize and create our own loading screen template. Second of them TemplateData folder which contains loading screen textures and template scripts. This file lead browsers navigate your content and run it. So if you are using auto build systems like Jenkins you don't have to customize loading screen every single time.įirst of all when you build for WebGL you will see 3 files.įirst of them "index.html" file. Now we will change this screen also we will create our own template. Normally you will see Unity's default loading screen like below. I will try to explain most important things for WebGL build step by step and I will try to give important hints. Now I want to share my all knowladge about Unity WebGL so someone who stucked or doesn't know where to start can benefit from this article. Now we have resolved most of the issues and our Game is working on 2GB Ram (WebGL Memory Size: 400 in Publish Settings) on almost every browser. We are about to release the WebGL build but we had faced a lot of struggle.ĭue to lack of tutorials or documentation for Unity WebGL build there were lots of stuff we had to resolve. We have been working on Unity WebGL build almost for a 2 month.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |