Skip to content

bellmj998/WebGL_Portfolio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

144 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Source code is available on my Github Repository.

Website

I created a new WebGL Template that would position my game in a Canvas object that will expand over the whole screen to simulate a FullScreen window. Check my Full Screen WebGL Template for more information.

The build is then hosted hosted on Github Pages and is inspired by it's default static site system to add content in the form of Markdown files.

Markdown Parsing

I used the library FancyTextRendering to parse my MD files and store them into text boxes that support Rich Text rendering to speed up the addition of new content in my pages.

Streaming Assets

In order to limit the initial loading time of the project, I moved some of the heaviest files into Unity's Streaming Assets folder, and fetch the file on runtime when needed through HTML requests.

CI/CL

In order to avoid rebuilding the project and deplyong each time a change is made, I set up a quick Github Action that would listen to the commits in the repository using Game CI.

Each time a new push is detected, the action would trigger to make a new WebGL build and deploy it on the gh-pages branch, that is set up as source for the deoplyed website.

Limitations and Future plans

Since the view is effectively just an Unity game window, all the resemblances to a regular website are just simulated in the engine and many of those expected behaviours are still not implemented yet. Some examples are:

  • Text size adapting according to the view setting
  • Not being able to select and copy text
  • Not being able to zoom in and out by pinching and dragging on mobile
  • The back button would make the user leave the game view
  • Scrolling with middle mouse button doesn't work

Notes

  • There was a bug in Unity where TMP_TextUtilities.FindIntersectingLink wouldn't work when TextOverflowModes is set to TextOverflowModes.Link. More information in this bug thread.

    A workaround I used is to rewrite and fix the functionality of FindIntersectingLink in a custom class and use that instead, until Unity fixes the official one themselves.

  • Images and videos will not work in editor since they being stripped from the game files. A solution would be to create a Removable Assets folder in game for editor visualization. Add a deployment job to move that folder's content into the StreamableAssets folder to be hosted online just before the build begins.

About

Repository for porfolio website made in Unity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 79.8%
  • ShaderLab 15.3%
  • HLSL 2.7%
  • HTML 1.5%
  • CSS 0.7%