XaiJu
Peter

Peter

patreon


Peter posts

[Unity Tip] Use TryGetComponent(0 to avoid null Reference Exception

To avoid getting a Null Reference Exception in Unity, use TryGetComponent() instead of GetComponent() when working with components๐Ÿ™‚๐Ÿ‘

#unitytips #gamedev #unity2d #IndieGameDev #Coding

View Post

Exactly 4 years ago, I took a leap of faith...

Exactly 4 years ago, I took a leap of faith and quit my day job to pursue my dream of making games ๐Ÿ˜–๐Ÿ˜ฑ๐Ÿ‘พ

Today, my video about my game is featured on Unity's website and it finally feels like it all wasn't just a waste of time ๐Ÿคฉ๐Ÿ˜ฎโ€๐Ÿ’จ๐Ÿฅณ

https://assetstore.unity.com/sunny-valley-studio?aid=1011luq6W

View Post

[Unity Tip] Use Animation Layers to blend character animations together

Animation Layers allows you to blend different animations so that your character appears to look more realistic ๐Ÿ’ซ๐Ÿฅฐ๐Ÿ‘

View Post

[Preview] VR zombie project gameplay

Hey!

I am still working on the VR Zombie project (and the video). Here is a preview of how the gameplay will look like.

I am still implementing the AI to actually attack the player

View Post

WIP on a new video about VR Zombie game

Improved my VR Zombie shooting feedback ๐ŸงŸ๐Ÿ˜

Also added some headshot feedback ๐ŸŽฏ

Moving on to adding some AI for them / creating a playable level ๐Ÿ™‚

#unity3d #vr #oculus #quest2 #gamedev #madewithunity #ใ‚ฒใƒผใƒ ๅˆถไฝœ #gamedevelopment #IndieGameDev #indiedev

View Post

[Unity Tip] Disable Orange Box Outline of Particles

You can Disable the Orange Box Selection Outline from the gizmos dropdown by disabling "Selection Outline"  โน๏ธ๐Ÿ™‚

Can be useful when working with particle systemโœจ๐Ÿ’ซ

#UnityTips #unity2d #unity3d #vfx #gamedev #gamedevelopment #indiegamedev #indiedev

View Post

[Unity Tip] Using Hands as controllers in Unity VR Project

To add Hands Tracking and Visualization to your Unity VR game you can use the XR Hands package https://docs.unity3d.com/Packages/com.u

View Post

[UnityTip] Use Event Trigger to add OnClick to UI

Use ๐—˜๐˜ƒ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ถ๐—ด๐—ด๐—ฒ๐—ฟ component to quickly ๐—ฎ๐—ฑ๐—ฑ ๐—ข๐—ป๐—–๐—น๐—ถ๐—ฐ๐—ธ functionality to you ๐—จ๐—œ ๐—ฒ๐—น๐—ฒ๐—บ๐—ฒ๐—ป๐˜ โœจ๐Ÿ–ฑ๏ธ๐Ÿ‘† (or any other event ๐Ÿ™‚)

View Post

[Unity Tip] Selecting Multiple Enum in Inspector

You can ๐˜€๐—ฒ๐—น๐—ฒ๐—ฐ๐˜ ๐—บ๐˜‚๐—น๐˜๐—ถ๐—ฝ๐—น๐—ฒ ๐—˜๐—ป๐˜‚๐—บ values in ๐—จ๐—ป๐—ถ๐˜๐˜† ๐—ถ๐—ป๐˜€๐—ฝ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ by using [๐—™๐—น๐—ฎ๐—ด๐˜€] attribute ๐Ÿ™‚๐Ÿ‘


View Post

[Unity Tip] Changing color of Debug.Log messages

๐— ๐—ฎ๐—ธ๐—ฒ your ๐——๐—ฒ๐—ฏ๐˜‚๐—ด.๐—Ÿ๐—ผ๐—ด() messages ๐—บ๐—ผ๐—ฟ๐—ฒ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ฎ๐—ฏ๐—น๐—ฒ by using ๐—ฅ๐—ถ๐—ฐ๐—ต ๐—ง๐—ฒ๐˜…๐˜ ๐— ๐—ฎ๐—ฟ๐—ธ๐˜‚๐—ฝ ๐Ÿ”๐Ÿ’ซ๐Ÿ™‚

https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/StyledText.html

View Post

Building Idle Clicker in Unity - Full Project

Here is a tutorial on making an ๐—œ๐—ฑ๐—น๐—ฒ ๐—–๐—น๐—ถ๐—ฐ๐—ธ๐—ฒ๐—ฟ ๐—š๐—ฎ๐—บ๐—ฒ ๐—ถ๐—ป ๐—จ๐—ป๐—ถ๐˜๐˜†! ๐Ÿ˜๐Ÿ–ฑ๏ธ

youtu.be/GK9jQryYVCk

I will explain some math and design concepts behind making an Idle game๐Ÿ‘You can also ๐—ด๐—ฟ๐—ฎ๐—ฏ ๐˜๐—ต๐—ฒ ๐—™๐˜‚๐—น๐—น ๐—ฃ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜ that I show in the vid for ๐—ณ๐—ฟ๐—ฒ๐—ฒ ๐Ÿ™‚


View Post

[Unity Tip] Use Shift+Space to quickly Maximize and Minimize tabs in Unity

To quicky ๐— ๐—ฎ๐˜…๐—ถ๐—บ๐—ถ๐˜‡๐—ฒ and ๐— ๐—ถ๐—ป๐—ถ๐—บ๐—ถ๐˜‡๐—ฒ ๐˜๐—ฎ๐—ฏ๐˜€ in Unity you can use ๐—ฆ๐—ต๐—ถ๐—ณ๐˜+๐—ฆ๐—ฝ๐—ฎ๐—ฐ๐—ฒ shortcut key ๐Ÿ™‚

Very useful when working with Shader Graph window ๐Ÿ‘๐Ÿ˜

View Post

[Unity Tip] Scrolling Background Shader

To add ๐—ฆ๐—ฐ๐—ฟ๐—ผ๐—น๐—น๐—ถ๐—ป๐—ด ๐—•๐—ฎ๐—ฐ๐—ธ๐—ด๐—ฟ๐—ผ๐˜‚๐—ป๐—ฑ ๐—ฒ๐—ณ๐—ณ๐—ฒ๐—ฐ๐˜ โฌ to you Unity game you can use a simple ๐—–๐˜‚๐˜€๐˜๐—ผ๐—บ ๐—ฆ๐—ต๐—ฎ๐—ฑ๐—ฒ๐—ฟ ๐Ÿ’ซ๐Ÿ™‚

Here is a mini tutorial on how to implement it ๐Ÿ˜

View Post

[Unity Tip] How to make GLOWING Lamp in Unity

Make your ๐—Ÿ๐—ฎ๐—บ๐—ฝ ๐—š๐—น๐—ผ๐˜„ ๐Ÿ’ก in Unity by using ๐—˜๐—บ๐—ถ๐˜€๐˜€๐—ถ๐—ผ๐—ป ๐—ฝ๐—ฎ๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜๐—ฒ๐—ฟ with a ๐—ง๐—ฒ๐˜…๐˜๐˜‚๐—ฟ๐—ฒ ๐— ๐—ฎ๐˜€๐—ธ ๐Ÿคฟ to limit the glow to the light bulb element ๐Ÿ™‚๐Ÿ‘

*If your models don't use textures you may not need the extra texture mask ๐Ÿ˜


View Post

Tutorial Preview - Incremental Game in Unity

I'm Preparing a ๐˜๐˜‚๐˜๐—ผ๐—ฟ๐—ถ๐—ฎ๐—น about creating an ๐—œ๐—ป๐—ฐ๐—ฟ๐—ฒ๐—บ๐—ฒ๐—ป๐˜๐—ฎ๐—น ๐—ด๐—ฎ๐—บ๐—ฒ in Unity๐Ÿ˜๐Ÿ–ฑ๏ธ

Here is a playable version: ๐ŸŽฎ๐Ÿ™‚๐Ÿ‘พ

https://svstudio.itch.io/alien-invasion-incremental-game

Will be posting a full project for FREE (will let you know in the next video)

View Post

[Unity tip] How to make Lighting Generation in Unity FASTER

To ๐—ฆ๐—ฝ๐—ฒ๐—ฒ๐—ฑ ๐—จ๐—ฝ the ๐—Ÿ๐—ถ๐—ด๐—ต๐˜๐—ถ๐—ป๐—ด ๐—š๐—ฒ๐—ป๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐Ÿ’ก in Unity we can LOWER ๐Ÿ“‰ ๐—Ÿ๐—ถ๐—ด๐—ต๐˜๐—บ๐—ฎ๐—ฝ ๐—ฅ๐—ฒ๐˜€๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป parameter ๐Ÿ™‚

This can be ๐˜‚๐˜€๐—ฒ๐—ณ๐˜‚๐—น ๐˜„๐—ต๐—ฒ๐—ป you are ๐—ถ๐˜๐—ฒ๐—ฟ๐—ฎ๐˜๐—ถ๐—ป๐—ด ๐Ÿ”„ over the Lighting settings before you are ready for a higher quality bake ๐Ÿ‘


View Post

[Unity Tip] Why FindObjectOfType returns null?

๐—™๐—ถ๐—ป๐—ฑ๐—ข๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜๐—ข๐—ณ๐—ง๐˜†๐—ฝ๐—ฒ<..>() ๐Ÿ” method will ๐—ฟ๐—ฒ๐˜๐˜‚๐—ฟ๐—ป ๐—ก๐—จ๐—Ÿ๐—Ÿ  if the searched ๐—ผ๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜ is ๐—ฑ๐—ถ๐˜€๐—ฎ๐—ฏ๐—น๐—ฒ๐—ฑ in the hierarchy ๐Ÿ˜‘

It can be really frustrating if you don't know it - especially since ex GetComponents<>() finds all the objects ๐Ÿ‘๐Ÿ™‚


View Post

[Unity Tip] Quick way to use Enum in a Switch Statement in Unity

You can quickly ๐—ด๐—ฒ๐—ป๐—ฒ๐—ฟ๐—ฎ๐˜๐—ฒ a ๐˜€๐˜„๐—ถ๐˜๐—ฐ๐—ต ๐˜€๐˜๐—ฎ๐˜๐—ฒ๐—บ๐—ฒ๐—ป๐˜ for your ๐—˜๐—ป๐˜‚๐—บ๐˜€ using ๐—ฐ๐—ผ๐—ฑ๐—ฒ ๐˜€๐—ป๐—ถ๐—ฝ๐—ฝ๐—ฒ๐˜๐˜€ in Visual Studio ๐Ÿ™‚

Might save you some typing โŒจ๏ธ

View Post

[Unity Tip] How to fix "Random is ambiguous"

How to fix "๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—ถ๐˜€ ๐—ฎ๐—ป ๐—ฎ๐—บ๐—ฏ๐—ถ๐—ด๐˜‚๐—ผ๐˜‚๐˜€ ๐—ฟ๐—ฒ๐—ณ๐—ฒ๐—ฟ๐—ฒ๐—ป๐—ฐ๐—ฒ.." error?๐Ÿค”

Simply type: ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ = ๐—จ๐—ป๐—ถ๐˜๐˜†๐—˜๐—ป๐—ด๐—ถ๐—ป๐—ฒ.๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ;  at the top of your script. โŒจ๏ธ

It will let the compiler know which library you want to use in this script๐Ÿ™‚

View Post

[UnityTip] Use Z to swap between Pivot and Center handle position

Hey!

A quick shortcut key tip - you can press ๐—ญ to quickly ๐˜€๐˜„๐—ฎ๐—ฝ between ๐—ฃ๐—ถ๐˜ƒ๐—ผ๐˜ and ๐—–๐—ฒ๐—ป๐˜๐—ฒ๐—ฟ handle position in the Scene View ๐Ÿ™‚

View Post

[UnityTip] How to change naming convention for duplicated object in Unity

You can ๐—ฐ๐—ต๐—ฎ๐—ป๐—ด๐—ฒ the ๐—ฑ๐—ฒ๐—ณ๐—ฎ๐˜‚๐—น๐˜ ๐—ป๐—ฎ๐—บ๐—ถ๐—ป๐—ด of duplicated objects "๐—ฃ๐—ฟ๐—ฒ๐—ณ๐—ฎ๐—ฏ (๐Ÿญ)" in Unity by going to the Project Settings tab ๐Ÿ™‚

View Post

Unity Tip - Use ๐—ฅ๐—ฒ๐—ฐ๐˜๐—ง๐—ฟ๐—ฎ๐—ป๐˜€๐—ณ๐—ผ๐—ฟ๐—บ๐—จ๐˜๐—ถ๐—น๐—ถ๐˜๐˜† to easily convert Screen space to World space

You can in Unity - for example to ๐—ฑ๐—ฟ๐—ฎ๐—ด ๐—จ๐—œ ๐—ฒ๐—น๐—ฒ๐—บ๐—ฒ๐—ป๐˜๐˜€๐Ÿ™‚๐Ÿ–ฑ๏ธ๐Ÿ‘†

Here is a step by step explanation:

https://youtu.be/sXTAzcxNqv0

#UnityTips #unity3d #unity2d #gamedev #gamedevelopment

View Post

[Unity Tip] Can't add script error

"๐‚๐š๐ง'๐ญ ๐š๐๐ ๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ.." error message ๐Ÿšฉusually is a result of Unity / VS failing to recompile your script ๐Ÿ˜‘

Just create a New Script to force recompilation process ๐Ÿ˜ฎโ€๐Ÿ’จ๐Ÿ™‚

#unitytips #unity2d #unity3d #gamedev #gamedevelopment

View Post

Last part of the Grid Placement system tutorial is Up!

Hey guys!

All the video for the Grid Placement System in Unity are available :)

Here is a link to the playlist:

https://www.youtube.com/playlist?list=PLcRSafycjWFepsLiAHxxi8D_5GGvu6arf

I hope that you will find it useful!

-Peter

View Post

[Unity Tip] You can ๐—œ๐˜€๐—ผ๐—น๐—ฎ๐˜๐—ฒ an ๐—ผ๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜ in the ๐˜€๐—ฐ๐—ฒ๐—ป๐—ฒ ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐Ÿ”

You can ๐—œ๐˜€๐—ผ๐—น๐—ฎ๐˜๐—ฒ an ๐—ผ๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜ in the ๐˜€๐—ฐ๐—ฒ๐—ป๐—ฒ ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐Ÿ” by selecting it and pressing ๐—ฆ๐—ต๐—ถ๐—ณ๐˜ + ๐—› ๐Ÿ™‚

Project in the vid is my Voxel World in Unity tutorial๐Ÿ˜ 


https://youtu.be/leBl6q21-0I 

View Post

[Tutorial] Showing Grid on a map - Grid Placement System P2

Hey!

Next part of my ๐—ด๐—ฟ๐—ถ๐—ฑ ๐—ฝ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐˜€๐˜†๐˜€๐˜๐—ฒ๐—บ in ๐—จ๐—ป๐—ถ๐˜๐˜† is here!

We will create a ๐—ด๐—ฟ๐—ถ๐—ฑ ๐˜ƒ๐—ถ๐˜€๐˜‚๐—ฎ๐—น๐—ถ๐˜‡๐—ฎ๐˜๐—ถ๐—ผ๐—ป using a custom ๐˜€๐—ต๐—ฎ๐—ฑ๐—ฒ๐—ฟ ๐Ÿ™‚

I hope that you will find it useful!

-Peter

View Post

[Project Files] Grid Placement System in Unity

Hey!

ZIP file contains a full project. Just unpack it to a new folder and open in Unity Hub using Unity 2022.2.

Unitypackage should be added to a 3D URP project since we will be using Shader graph later on

-Peter

View Post

Sims like house building system in Unity

My video about creating a ๐—ฆ๐—ถ๐—บ๐˜€-like ๐—›๐—ผ๐˜‚๐˜€๐—ฒ ๐—•๐˜‚๐—ถ๐—น๐—ฑ๐—ถ๐—ป๐—ด ๐˜€๐˜†๐˜€๐˜๐—ฒ๐—บ in ๐—จ๐—ป๐—ถ๐˜๐˜† is here! ๐Ÿ”จ๐Ÿ‘ท๐Ÿก

I hope that you will find it useful ๐Ÿ™‚

https://youtu.be/8kv1RcBKcqY

View Post

[Preview] Sims-like building system in Unity

Hey!

I know that I haven't posted any new tutorial in a while. Sorry about that. I was preparing a Sims like building system in Unity for February but I failed to finish it in time. ๐Ÿ˜…


Here is a little preview of what I will cover (had to seriously condense it to fit the 8 mb requirements for a vid on discord). I will do my best to release it this week since I need to finish the Farm Game Course next.


PS. 

Sorry to all who ...

View Post

[Unity Tip] Calling code inside Unity Inspector using ContextMenu attribute

Use a [๐—–๐—ผ๐—ป๐˜๐—ฒ๐˜…๐˜๐— ๐—ฒ๐—ป๐˜‚] attribute to ๐—ฎ๐—ฑ๐—ฑ a ๐—ต๐—ฒ๐—น๐—ฝ๐—ฒ๐—ฟ ๐—บ๐—ฒ๐˜๐—ต๐—ผ๐—ฑ to be ๐—ฐ๐—ฎ๐—น๐—น๐—ฒ๐—ฑ from the ๐—จ๐—ป๐—ถ๐˜๐˜† ๐—ถ๐—ป๐˜€๐—ฝ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ ๐Ÿ™‚(no need for a custom Editor script)๐Ÿ˜Ž

You can call it from the 3 dots context menu of your script ๐Ÿ‘

View Post