Unity - Open Door, with Safe Code.

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 29

  • @UncleJezus
    @UncleJezus 2 года назад +3

    I'm really struggling to find a tutorial that'll be useful for my project. This tutorial really helps! Appreciate you shared this.

  • @lovecrypto4979
    @lovecrypto4979 2 года назад +1

    Thank you for your tutorial.
    I was just looking for how to open the door with PIN number.

  • @katerinaorgandzhieva4106
    @katerinaorgandzhieva4106 Год назад +1

    Amazing video, thank you! Keep up the good work :)

  • @chaimabensalem1885
    @chaimabensalem1885 2 года назад +1

    Fantastic tutorial!! thanks for the help!!!!

  • @vikriereonaldo4933
    @vikriereonaldo4933 Год назад

    Thanks for tutorial

  • @kazyha
    @kazyha 7 месяцев назад +1

    Thanks you very much!

  • @facusandoval4074
    @facusandoval4074 2 года назад

    Thank you, bro!!

  • @missoo7128
    @missoo7128 8 месяцев назад

    Thank you❤

  • @أريجالشمري-س6ش
    @أريجالشمري-س6ش 2 года назад

    I do the same thing but the keypad doesn't appear do you have any idea thanx for the video

  • @yungluap7212
    @yungluap7212 Год назад

    Can i use this also in VR?

  • @dxvl2125
    @dxvl2125 2 месяца назад +1

    i cant press the buttons on the code

    • @ashturnen3178
      @ashturnen3178 4 дня назад

      I had the same issue. add this if statement code under the void update()
      if(CodePanel.activeInHierarchy)
      {
      Cursor.visible = true;
      Cursor.lockState = CursorLockMode.None;
      }

  • @ripgojo
    @ripgojo Год назад

    When i press e my character teleports away. Like sometiems when i want to put in the code i press e for the pop up and im teleported behind the wall next to me

  • @RyanKitchen-x8c
    @RyanKitchen-x8c Год назад

    how do i add a sound to every time you click a button

    • @ClipCollectionVault
      @ClipCollectionVault  Год назад

      You Can check my Tutorial about Sound manager, there it id easy to add it

  • @walidbenothmen7741
    @walidbenothmen7741 2 года назад

    great video but i have a problem when i enter the code to open the door i have to click many times to get the number.

    • @ClipCollectionVault
      @ClipCollectionVault  2 года назад +1

      Hi, Can you share your code, then, I Can take a look ?

    • @walidbenothmen7741
      @walidbenothmen7741 2 года назад

      @@ClipCollectionVault okay...
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      using TMPro;
      public class OpenDoor : MonoBehaviour
      {
      private Animator anim;
      private bool IsAtDoor = false;
      [SerializeField] private TextMeshProUGUI CodeText;
      string CodeTextValue = "";
      public string safeCode;
      public GameObject CodePanel;
      // Start is called before the first frame update
      void Start()
      {
      anim = GetComponent();
      }
      // Update is called once per frame
      void Update()
      {
      CodeText.text = CodeTextValue;
      if(CodeTextValue == safeCode)
      {
      anim.SetTrigger("OpenDoor");
      CodePanel.SetActive(false);
      }
      if(CodeTextValue.Length >= 4)
      {
      CodeTextValue = "";
      }
      if(Input.GetKey(KeyCode.E) && IsAtDoor ==true)
      {
      CodePanel.SetActive(true);
      }

      }
      private void OnTriggerEnter(Collider other)
      {
      if (other.tag == "Player")
      {
      IsAtDoor = true;
      }
      }
      private void OnTriggerExit(Collider other)
      {
      IsAtDoor = false;
      CodePanel.SetActive(false);
      }
      public void AddDigit(string digit)
      {
      CodeTextValue += digit;
      }
      }

    • @ClipCollectionVault
      @ClipCollectionVault  2 года назад +2

      @@walidbenothmen7741 code looks correct, so do you need to click the numbers, many times before it writes it ? Are there a thing blocking the number ? Other objects ?

  • @morarogames
    @morarogames 2 года назад

    thank you :(

    • @ClipCollectionVault
      @ClipCollectionVault  2 года назад

      Did you get it to work ?

    • @morarogames
      @morarogames 2 года назад +1

      @@ClipCollectionVault yes thank you but i need one more thing if you can i want the game to write pres e to open keypad