How to Make a Door System in Unity - Unity C# Tutorial

Тәжірибелік нұсқаулар және стиль

In this Unity C# tutorial, I teach you guys how to make a door system in Unity.
#Unity #Unity3D #gamedev
For more Unity tutorials like this or more videos in general - be sure to like, comment, and subscribe for more! 👍
The Door Script (Attach it to your player's camera):
drive.google.com/file/d/1-Dbz...
Wishlist Bodhi 'n' Friends on Steam now:
store.steampowered.com/app/22...
Follow me on Twitter:
/ omogonix
Try out my games:
omogonixlachlan.itch.io
My Website:
omogonix.weebly.com/
Subscribe to my Second Channel:
/ @lachlanshelton129
Join my Discord:
/ discord
Facebook Page:
/ omogonix

Пікірлер: 91

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

    The script (make sure to attach it to your player's camera): drive.google.com/file/d/1-Dbzcu_V16pCAExOMiMfAGCw5Jzk8DkY/view?usp=sharing If you found this tutorial a little hard to follow, I made another door tutorial recently as well if you guys wanna check it out: kzread.info/dash/bejne/qa6C282qg7PHYLA.html

  • @danielbisko

    @danielbisko

    Жыл бұрын

    forgot to pin

  • @Omogonix

    @Omogonix

    Жыл бұрын

    @@danielbisko Thanks for letting me know

  • @Pro_bricks

    @Pro_bricks

    10 ай бұрын

    @@Omogonix I have a problem with an animation of the door. My door is repeating and repeating the animation and it has got a problem : "The variable intText of DoorScript has not been asigned". Can you help me

  • @Lazyy-Gamer

    @Lazyy-Gamer

    10 ай бұрын

    @@Pro_bricks bro make sure to uncheck the animator in the door parent

  • @jovial_joe_k
    @jovial_joe_k2 күн бұрын

    Excellent tutorial! Concise, with everything explained quite well!

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

    Thanks i really needed this wa better script than others and thanks so much for voiving it as well. It helps so much

  • @user-gb6fk5rz1z
    @user-gb6fk5rz1z6 ай бұрын

    This is great, thanks my guy!

  • @SunilSingh-kj4gd
    @SunilSingh-kj4gd Жыл бұрын

    Finally it's here. 🎉 Thank you bro. 😊

  • @Omogonix

    @Omogonix

    Жыл бұрын

    No problem! :)

  • @TejasXGamerz
    @TejasXGamerz9 ай бұрын

    Very thank you for this tutorial

  • @gameview7786
    @gameview778611 ай бұрын

    tried your entire tutorial, everything works except the text and the door wont open, how do i fix this

  • @MegaXDbr
    @MegaXDbr4 ай бұрын

    How to clone door? I tried but the same animation active to other doors too

  • @ballistickgamerya941
    @ballistickgamerya94126 күн бұрын

    thank you works well now only if I could get a door to open after buttons are pressed in the right order from different locations.

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

    Can you please make the tutorial about how to make enemy that he can detect sound if he is in a specific range and go towards the sound

  • @DaveyGame
    @DaveyGame11 ай бұрын

    Thanks So Much!!!

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

    I have 1 problem, why when I duplicate the door why can't it? this happens when i switch to game mode, but in scene mode it is somewhere else, can you help me?

  • @hollusta2997
    @hollusta29977 ай бұрын

    And if I want to turn the doorway by 90, do I need to do new animations?

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

    How would I make this visible to all my players in a multiplayer game

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

    Errors: If i turned off the loops, my door just wont play opening and closing.

  • @Glidching
    @Glidching4 ай бұрын

    when I make the animation and rotate with the door hinge my door scales

  • @aryashowman8035
    @aryashowman80352 ай бұрын

    when entry animation is set to close door animation , my door is having close door animation in loop at the start of scene . please help

  • @okid1027

    @okid1027

    2 ай бұрын

    I've found the solution to the problem! You just need to find your animation in your assets folder, it should look like a blue triangle with some white lines behind it. Left click it and a "Inspector" should pop up on the right side of your screen. There something called "Loop time", uncheck it for "door close" and "door open" animation. This fixed it for me!

  • @AntonioD225

    @AntonioD225

    Ай бұрын

    @@okid1027 appreciate it bro I was gonna watch the video all over again and thankfully I found your comment

  • @ninnaja_above_kids9415
    @ninnaja_above_kids94155 ай бұрын

    bro every time i try your flashlight or door scripts doesnt work idk why

  • @frozenKnight112
    @frozenKnight1126 ай бұрын

    is it door anim or door anin

  • @lol-on1dr
    @lol-on1dr Жыл бұрын

    Hey omogonix, can you make E to pickup letter script please.

  • @Micahreed1234
    @Micahreed123413 күн бұрын

    every time i do it, the hinge keeps going to the wrong side

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

    not working can you help me?

  • @AmitojGamerBoy
    @AmitojGamerBoy9 ай бұрын

    2:27 Thanks Brother ❤❤❤❤

  • @BonesOfficial_
    @BonesOfficial_Ай бұрын

    Can you make a tutorial about keys?

  • @hurricaneblackandwhite1219
    @hurricaneblackandwhite12193 ай бұрын

    ive done all the steps shown but when i interact with the door using the E key it doesn't start the animation?

  • @samvandergast4410

    @samvandergast4410

    Ай бұрын

    have you found a solution?

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

    Idk why it ain't working but it just doesn't work for me idk what I'm doing wrong

  • @Speko2090.
    @Speko2090. Жыл бұрын

    When I go into the game the door is continuously opening and closing. How do I fix?

  • @realb4825

    @realb4825

    11 ай бұрын

    I think yo uhave to go to the animation adn turn off loot time

  • @YuYu-Bi

    @YuYu-Bi

    11 ай бұрын

    @@realb4825 still thats not the only prob, the text will appear but when u press e, the door wont open

  • @BlobAlt
    @BlobAlt5 ай бұрын

    before i watch the entire video im just looking for a specific problem, where the animation is just baked in and not additive so if i open a door it will go to rotation 0,90,0 even if the start rotation was for example 0,70,0 does the solution exist here?

  • @Omogonix

    @Omogonix

    5 ай бұрын

    The door in this tutorial just uses animations for rotating instead of rotating the door via script

  • @user-pe3zt5he5l
    @user-pe3zt5he5l8 ай бұрын

    it sayes: Can't add script component 'Door' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match. what does that mean?

  • @Omogonix

    @Omogonix

    8 ай бұрын

    It means the name of the script and its class name dont match. Make sure the public class name inside of the script is the same as the script's file name. For example: if your door's script name is "door.cs", make sure the public class name in the script is called "door"

  • @Braynbuster
    @Braynbuster5 ай бұрын

    It don’t work for me I typed the code exactly like you did

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

    Can you make a resident evil door system please

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

    The door keeps on running the door animation when i press start could you please help with that

  • @faded87

    @faded87

    Жыл бұрын

    Make sure your animation is not set on loop

  • @hamishdelaforce1048
    @hamishdelaforce10486 ай бұрын

    how do u stop the animation from looping?

  • @Splatenohno

    @Splatenohno

    6 ай бұрын

    Click on the animation you don’t want to loop in the project menu. In the inspector click loop which should disable it

  • @TheFinMovies-zj1rp
    @TheFinMovies-zj1rp5 ай бұрын

    when i try this out the door is loopin on the open animation

  • @alpery8

    @alpery8

    4 ай бұрын

    same

  • @schultz2046

    @schultz2046

    4 ай бұрын

    Same

  • @THECRAZY5673

    @THECRAZY5673

    4 ай бұрын

    @@schultz2046turn the loop off search it up to stop the animation loop in unity

  • @gamingwithdaven1234

    @gamingwithdaven1234

    3 ай бұрын

    Same

  • @gamingwithdaven1234

    @gamingwithdaven1234

    3 ай бұрын

    I figured out how to help if you didn’t figure out yet, you probably did

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

    wwwoooww

  • @oxez-xd
    @oxez-xd Жыл бұрын

    You have insta pro ineed you help me in something

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

    Which version on unity do you use?

  • @Omogonix

    @Omogonix

    Жыл бұрын

    Unity 2021.3.15f1 for my tutorials

  • @blandpotato545
    @blandpotato54510 ай бұрын

    A lot of people have the exact same problem with the door not opening. You haven’t replied to any of them, are you ever going to fix it?

  • @Omogonix

    @Omogonix

    10 ай бұрын

    There is no issue, a bunch of people just haven't done something right - I haven't been replying to people since I'm busy working on other stuff. I don't upload tutorials that don't work, that's against my ethics. Sometimes my tutorials may have a small issue here or there, but I don't upload tutorials if something doesn't work entirely. There's nothing to fix here, just make sure you watch the tutorial properly so you know what you're doing.

  • @Omogonix

    @Omogonix

    10 ай бұрын

    Since I don't like seeing people struggle, I'll give you a few tips to try help you out: make sure your door is tagged as "door", make sure your door's Animator is attached to a parent object of your door, and make sure the script is attached to your camera with the variables filled in. Hope that gives a bit of help! I may make an updated tutorial sometime that makes it a bit easier to understand how to do it.

  • @fleaxyt5926
    @fleaxyt59266 ай бұрын

    i did all your steps but i cant interact with the door + im running trough them

  • @erichspringer6951

    @erichspringer6951

    5 ай бұрын

    you need to add a box collider i think and i have the same problem i cant interact

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

    I did all of that and the animation won’t play (I figured it out)

  • @gameview7786

    @gameview7786

    11 ай бұрын

    how did you get this to work, im unable to get the door to open or close using E

  • @MC_gamers_alt
    @MC_gamers_altАй бұрын

    My doors not working and it looks like it's having a seizure

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

    for me the door closing keeps on looping

  • @TalVerseOfficial

    @TalVerseOfficial

    10 ай бұрын

    Just turn of the loop animation

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

    The intText shows up, but pressing E doesn’t do anything.

  • @danielbisko

    @danielbisko

    Жыл бұрын

    same here

  • @neildaivepenaranda4442

    @neildaivepenaranda4442

    8 ай бұрын

    any solution?

  • @neildaivepenaranda4442

    @neildaivepenaranda4442

    8 ай бұрын

    did you fix it?

  • @Resolver101

    @Resolver101

    8 ай бұрын

    @@neildaivepenaranda4442 I was never able to figure that out.

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

    First

  • @x3-nf3ce
    @x3-nf3ce2 ай бұрын

    very helpful (unlike me)

  • @user-pe3zt5he5l
    @user-pe3zt5he5l8 ай бұрын

    it doesent work the door.

  • @Omogonix

    @Omogonix

    8 ай бұрын

    If you're having trouble with this door, I made a newer tutorial I think may be easier to understand: kzread.info/dash/bejne/qa6C282qg7PHYLA.html

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

    This was a mess of a tutorial. There are revisions in the video later on and even when it mentions going back to the animator, so you spend time learning a wrong/incorrect way only to later on randomly get the "right way". The video should have been cleaned and organized before being uploaded for a proper streamlined guide. Either way, the doors don't open on my end.

  • @executeres
    @executeres3 ай бұрын

    bandicam

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

    yo

  • @sampathfonseka3995
    @sampathfonseka39958 ай бұрын

    I follow your every steps but i didn't work

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

    its not working

  • @exsharpcheddar105

    @exsharpcheddar105

    Жыл бұрын

    Yeh mine ain't working either mine won't open

  • @laxy-gamer

    @laxy-gamer

    10 ай бұрын

    mine too

Келесі