Category: Unity Dev Log
-
Creating a new repository in Github
Step 1: Go to Github.com and create a new repository with a readme file and unity gitignore. Step 2: Open up the repository using Github desktop and clone the directory. Step 3: Cut and paste your files into that directory. Commit to main.
-
Converting to the new input system
Documenting how to convert to the new input system in Unity. Methods may be refined and are subject to change. Next, we are going into the code to rewire the old system with the new. Open the player script. From here, the basics should be hooked up. A few extra tips are seen below.
-
UIToolkit
Finally, Unity has released a LTS (Unity 2021.3.0f1) with UIToolkit and UI Builder as stable features. General steps taken to implement: Right click in hierarchy > UI Toolkit > UI document Right click in asset folder in project tab > Create > UI Toolkit > UI document Drag this UI document into the Source Asset…
-
Adding a health bar (or anything similar)
In “Alma of the Forest”, you hold a torch which slowly depletes over time until you get to certain recharge points. In this application, we want to show a bar that depletes with time, fades slightly in alpha over time, and then blinks when the power left in the torch is less than 30%. Below…
-
Adding Flickering Lights
This code snippet shows an example of how to implement flickering lights. The only tricky part is grabbing the correct components to change, selecting the colors/intensities that you want to flicker to and from and making sure to have a boolean that determines when it is flickering. If it is true, you only want to…
-
Dialogue Tips-Minimalist vs Panel
For games that are fairly monochromatic, you may try using text that is a complementary color on the color wheel against the background with possibly some shadow behind it to help visibility. Here is an example of a minimalist looking dialogue UI. Once you get this far, it’s quite simple to change to a panel…
-
Dialogue Tip Typewriter Effect
To create the typing effect during dialogue, some use a string builder to type out the sentence letter by letter. The problem with this is when the last word of a line is being built and is too long for the current line, the word then moves itself to the line below mid-word creating a…
-
Any Key Press – New Input System
I struggled finding a solution to making a splash screen that took in any input from controller or keyboard in conjunction with the new input system. This little snippet has come in wonders for advancing dialogue and the splash screen. The lambda functions can also be put into regular curly braces if you would like…
-
New Unity Input System
I am becoming more and more comfortable with Unity’s new input system and using events. It has been amazing in Me & I as we have switched bindings several times between the keyboard and gamepad.