Unity Tutorial (2021) - Adding Enemies

Ғылым және технология

In this Unity Beginner Tutorial, we'll add basic Enemies to our Game!
== UNITY VERSION IN THIS TUTORIAL ==
Unity 2020.3.13f1 LTS
== UNITY PLAYLIST & SUBSCRIBE ==
📃 The Unity Playlist easily accessible here: url.kaupenjoe.net/ytUnity2021...
🔴 Don't forget to subscribe for more awesome tutorials: url.kaupenjoe.net/tutorials/sub
== ASSETS & DOWNLOAD LINKS ==
GitHub Repo: github.com/Tutorials-By-Kaupe...
Gist: url.kaupenjoe.net/yt33/gist
Unity Package: url.kaupenjoe.net/yt33/package
Goblin (by o-lobster): url.kaupenjoe.net/yt33/textures
== TIMESTAMPS ==
0:00 Intro
0:13 Quick Explanation
0:26 Setup
1:14 EnemyData Script
2:12 Creating a new Enemy
2:59 The Enemy Script
5:42 Modifying the Health Script
6:40 Some more Setup that's needed
7:44 First Demonstration
8:17 Adding another Enemy Type
8:33 Creating PreFabs
8:49 Duplicating some Enemies
9:02 Demonstration
9:25 Great Thing about ScriptableObjects
10:13 Outro
== TAKE A LOOK AT MY COURSES WITH COUPON CODES ==
▶️ NEW Forge Modding with Minecraft 1.20.X:
url.kaupenjoe.net/CourseForge...
▶️ Learn Forge Modding with Minecraft 1.18:
url.kaupenjoe.net/CourseForge118 *
▶️ Learn Fabric Modding with Minecraft 1.18:
url.kaupenjoe.net/CourseFabri... *
▶️ Complete and Roblox Lua Game Development:
url.kaupenjoe.net/RobloxCoupon *
== SOCIALS ==
Discord: / discord
Personal Twitter: / kaupenjoe
Instagram: url.kaupenjoe.net/tutorials/i...
Facebook: url.kaupenjoe.net/tutorials/f...
Twitter: url.kaupenjoe.net/tutorials/t...
TikTok: url.kaupenjoe.net/tutorials/t...
Written Tutorials: url.kaupenjoe.net/tutorials/blog
== LICENSE ==
Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
== ADDITIONAL CREDITS ==
Knight & Goblin (in Video and Thumbnail) from o_lobster, entire pack from here:
o-lobster.itch.io/simple-dung...
Outro Musik by Kevin MacLeod:
"That's a Wrap" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0
creativecommons.org/licenses/b...
== AMAZON AFFILIATE LINKS ==
Amazon Referral [US]: url.kaupenjoe.net/amazonref/us *
Amazon Referral [UK]: url.kaupenjoe.net/amazonref/uk *
Amazon Referral [DE]: url.kaupenjoe.net/amazonref/de *
== AFFILIATE DISCLAIMER ==
* Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
== HASHTAGS ==
#UnityTutorial #Unity #GameDevelopment #Kaupenjoe

Пікірлер: 22

  • @donutercz
    @donutercz Жыл бұрын

    Hello thank you so much this helped me with following the player after new enemy spawns from prefab, you are legend❤

  • @rizkialamsyah6273
    @rizkialamsyah6273 Жыл бұрын

    what a great video thankyou so much

  • @Hexful
    @Hexful2 жыл бұрын

    I've been looking all over for a good tutorial to explain this, thanks! Great video.

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    2 жыл бұрын

    Glad it was helpful!

  • @streamshoc9509
    @streamshoc95092 жыл бұрын

    good teacher ♥ Thank you!!

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    2 жыл бұрын

    Thank you! 😃💙

  • @testtestor4320
    @testtestor43202 жыл бұрын

    Thank you!!

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    2 жыл бұрын

    You're welcome! :D

  • @Justin-cx8lv
    @Justin-cx8lv Жыл бұрын

    Sorry for such a late comment, wonder if you could help with 3d scripit. the OnTriggerEnter2D seems to not work. I'm trying to create a unit attacking another unit (like a MOBA). Would be amazing if you could help if not, thank you so much for the this tutorial, really helped me learn and better understand how things work!

  • @donutercz
    @donutercz Жыл бұрын

    But i have one problem... I don't use this part of scrip for following for object destroys itself, i use for enemy that shoots so my problem is that when i touch the enemy he then moves weirdly, don't you know how to fix that? The moving script is all from your video.

  • @SERBIANUGANDANKNUCKLES
    @SERBIANUGANDANKNUCKLES Жыл бұрын

    i have error ArgumentNullExpection: Value cannot be null. pls help

  • @sovanreachchhan7089
    @sovanreachchhan70893 жыл бұрын

    Hi Kaupenjoe, I can't seem to put the swarmer dinghy to the enemy data at 7:27 Can you help me with that?

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    3 жыл бұрын

    Hey Sovanreach, that's interesting 🤔 I'm not quite sure why that would be happening... Let's go through some ideas: It's important that you create new ScriptableObject with the Context Menu as seen at 2:21 and not take the actual Script to try and drag it in there. For Reference, you can always download the unitypackage to take a look at the project or peek into the GitHub Repository to see if everything matches with your project :) I'm sure we'll find the culprit :D

  • @sovanreachchhan7089

    @sovanreachchhan7089

    3 жыл бұрын

    @@ModdingByKaupenjoe i did everything as you said in the video and when there is something wrong, i copied the code from github and paste but i can't seem to put the ScriptableObject to the goblin data

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    3 жыл бұрын

    ​@@sovanreachchhan7089 Interesting. I've just checked the GitHub. The Repo is definitely working as intended. Easiest way to check is probably for you to make a GitHub Repository with your current project then I can check what's going on :) Otherwise, I am frankly not quite sure why it's not working for you :/

  • @prochysolaire9055
    @prochysolaire90552 жыл бұрын

    Hello for some reason if(collider.GetComponent() != 0) it shows me this error (Operator '!=' cannot be applied to operands of type 'PlayerScript' and 'int') can u help me

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    2 жыл бұрын

    Hey There, if you look closely were not using 0 thif(collider.GetComponent() != 0) number in the script, but the keyword null which means something different! :) it has to be: if(collider.GetComponent() != null) Also I am using () not PlayerScript, but you might have it setup differently :)

  • @prochysolaire9055

    @prochysolaire9055

    2 жыл бұрын

    @@ModdingByKaupenjoe Omg thx so much i didnt even expect response this fast you are the best

  • @SERBIANUGANDANKNUCKLES
    @SERBIANUGANDANKNUCKLES Жыл бұрын

    And i have problem with my enemy he just spawn as small pixel and disapear.. how to share code with you so u can see where am i wrong but when am wrong i copy your code and paste in my project but still not working... hmmm

  • @ModdingByKaupenjoe

    @ModdingByKaupenjoe

    Жыл бұрын

    It's not only the code that's important! You also need to drag and drop things in the inspector! 6:40 and beyond for example!

  • @SERBIANUGANDANKNUCKLES

    @SERBIANUGANDANKNUCKLES

    Жыл бұрын

    @@ModdingByKaupenjoe maybe i cant implemet on platforms becouse i add your script and that override regular 2d collider, right?

  • @SERBIANUGANDANKNUCKLES

    @SERBIANUGANDANKNUCKLES

    Жыл бұрын

    @@ModdingByKaupenjoe 6:54 when i check is Triggerd my enemy fall through the ground... do u have any discord server so i can ask someone with pictures becouse am stuck here.. i was starting from scratch but still same.. even now tho my enemy spawn as diffrent sprite idk how ahahahah

Келесі