Delay a Function over time in

Veröffentlicht am: 28 März 2024
auf dem Kanal: Unity Game Dev Tutorial: build your first 3D game
16
4

Welcome to the Unity Game Development series!

Lesson Overview:
I'll show an alternative way, than the timer from the previous lesson, to delay a function over time in Unity. We use InvokeRepeating for this.

Another way is by using a Coroutine using IENumerator. I'll show how to do this.

And we create a bullet prefab with a C# script attached to it to shoot a bullet into the air.

And finally we ensure that a bullet is fired when the player presses the space bar using instantiate in the movement C# script.

♥ Subscribe:    / @stayincontrole  

00:00 Intro
00:55 InvokeRepeating
02:39 IENumerator
07:01 Create a Bullet Prefab
11:11 Fire a Bullet
13:28 Outro

#gamedev
#tutorial
#csharp
#unitygamedev
#gamedevelopment
#unity3d


Auf dieser Seite können Sie das Online-Video Delay a Function over time in mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Unity Game Dev Tutorial: build your first 3D game 28 März 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 16 Mal angesehen und es wurde von 4 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!