AlexJDev
AlexJDev
  • Видео 8
  • Просмотров 36 188
How to output MESSAGES to CONSOLE in Unity! [BEGINNER TUTORIAL]
Learn how to output key information, warnings, and errors into the console so you can figure out what is happening in your Unity game!
RICH TEXT DOCS: docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/StyledText.html
Просмотров: 598

Видео

Generate USERNAMES RANDOMLY In Unity! [INTERMEDIATE TUTORIAL]
Просмотров 8922 года назад
Learn how to generate usernames through an animated UI, similar to fall guys! This tutorial will teach you from scratch how to implement everything you need! If you have any questions or topics you'd like me to cover, be sure to put them in the comments below!
How To Make HANGMAN in Unity! [FULL GAME TUTORIAL]
Просмотров 6 тыс.2 года назад
Learn how to make the popular game Hangman from scratch in unity! This tutorial will teach you from scratch how to create a fully fledged unity game in just half an hour! Download Assets: drive.google.com/file/d/175Xqbo6p-Yi8M96H5pt2Ox-Fh4KTdjF_/view?usp=sharing Dynamic Scrollable UI: ruclips.net/video/U9zdiT8zuJQ/видео.html
Three Ways To DESTROY things In Unity! [BEGINNER TUTORIAL]
Просмотров 502 года назад
Learn how to destroy objects in unity through buttons and code! Chapters: 0:00 Destroy through button 1:22 Destroy the current script 2:12 Destroy the current Object
Keep GameObjects/Scripts Between Scenes In Unity The CORRECT way! [BEGINNER TUTORIAL]
Просмотров 4552 года назад
Learn how to keep objects and scripts between scenes the CORRECT way to prevent duplication and wasted resources! This tutorial uses the DontDestroyOnLoad function! Change Scene Tutorial: ruclips.net/video/2z4nfXNcp2s/видео.html&ab_channel=ImNotAlexx Chapters: 0:00 Introduction 0:19 Creating the Script 2:48 Testing the Script
How To Make PONG in Unity! [FULL GAME TUTORIAL]
Просмотров 28 тыс.2 года назад
Learn how to make a fully working Pong game in Unity within 30 minutes with this beginner guide! Assets Download: drive.google.com/file/d/1VfwIRqDaxyp-t7_1nubnTiTgwLJrqAHz/view?usp=sharing
Create a DYNAMIC Scrollable UI in Unity! [BEGINNER TUTORIAL]
Просмотров 3792 года назад
Create an expandable, dynamic UI element which can contain objects and be scrolled to uncover more! Chapters: 0:00 Intro 0:10 Create The Scrollable UI! 3:50 Add Objects Through Code!
Change Scenes In Unity With THREE Different Methods! [BEGINNER TUTORIAL]
Просмотров 5682 года назад
Learn how to change scenes in unity quickly with THREE different methods which can be applied to any game/scenario. Chapters: 0:00 Change Scene Through Index Number 3:12 Change Scene By Scene Name 4:09 Change Scene through Triggers/Collisions

Комментарии

  • @Thenumber1noobdev
    @Thenumber1noobdev 16 дней назад

    i hope you get menotized soon

  • @KramiIion
    @KramiIion 28 дней назад

    Ive finished watching your video and successfully made it work but how do i add hints?

  • @mangineer_rl
    @mangineer_rl 2 месяца назад

    Geniunely, taught be so much about those damn voids that I didn't understand at all. great video all-around <3

  • @jameswright6115
    @jameswright6115 2 месяца назад

    Old video so understand maybe a delay in response. But after the prefabs are added to the container via script, the pivot point is not updated to start the scroll from the top. How would I implement this? Thanks

  • @t.mahesh6365
    @t.mahesh6365 4 месяца назад

    I tried this , but in game ball doesn't move until I tried to move it by scene what problem is this

  • @paulembleton1733
    @paulembleton1733 4 месяца назад

    Decided to recreate Pong with extras. I know Unity basics and I’m an experienced developer so didn’t look at any tutorials. Now checking tutorials after finishing basic game and liking those that did much the same as me so that’s a 👍 for this one. Only criticism, if ( isTutorial ) playBackgroundMusic = false;

  • @trancongvinh4998
    @trancongvinh4998 4 месяца назад

    Can I have the ball movement code ?

  • @NitroO0o0oOooo000oO
    @NitroO0o0oOooo000oO 5 месяцев назад

    rlly bad tutorial nothing works i wrote the script exactly the same (wld u be able to give me the script code)

    • @AlexJDev
      @AlexJDev 5 месяцев назад

      By ‘nothing works’ what’s the actual error? You must have not followed it correctly. I recommend thinking about what’s not working and figuring out why as that’ll teach you much more than me just giving you the code. I can assure you though, the code in the tutorial and the instructions work :)

    • @NitroO0o0oOooo000oO
      @NitroO0o0oOooo000oO 5 месяцев назад

      @@AlexJDev the word container does not work and the game doesnt restart after i lose or win and the keyboard doesnt work the error say "game object has been destroyed" also the word u hve to guess does not show

    • @NitroO0o0oOooo000oO
      @NitroO0o0oOooo000oO 5 месяцев назад

      @@AlexJDev The script i wrote: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; using System.Runtime.CompilerServices; using UnityEditor.SceneManagement; public class HangmanController : MonoBehaviour { [SerializeField] GameObject wordContainer; [SerializeField] GameObject keyboardContainer; [SerializeField] GameObject letterContainer; [SerializeField] GameObject[] hangmanStages; [SerializeField] GameObject letterButton; [SerializeField] TextAsset possibleWord; private string word; private int incorrectGuesses, correctGuesses; void Start() { InitialiseButtons(); InitialiseGame(); } private void InitialiseButtons() { for (int i = 65; i <= 90; i++) { CreateButton(i); } } private void InitialiseGame() { //reset data back to original state incorrectGuesses = 0; correctGuesses = 0; foreach(Button child in keyboardContainer.GetComponentsInChildren<Button>()) { child.interactable = true; } foreach(Transform child in wordContainer.GetComponentsInChildren<Transform>()) { Destroy(child.gameObject); } foreach(GameObject stage in hangmanStages) { stage.SetActive(false); } //generate new word word = generateWord().ToUpper(); foreach(char letter in word) { var temp = Instantiate(letterContainer, wordContainer.transform); } } private void CreateButton(int i) { GameObject temp = Instantiate(letterButton, keyboardContainer.transform); temp.GetComponentInChildren<TextMeshProUGUI>().text = ((char)i).ToString(); temp.GetComponent<Button>().onClick.AddListener(delegate { CheckLetter(((char)i).ToString()); }); } private string generateWord() { string[] wordList = possibleWord.text.Split(" "); string line = wordList[Random.Range(0, wordList.Length - 1)]; return line.Substring(0, line.Length - 1); } private void CheckLetter(string inputLetter) { bool letterInWord = false; for(int i = 0; i < word.Length; i++) { if (inputLetter == word[i].ToString()) { letterInWord = true; correctGuesses++; wordContainer.GetComponentsInChildren<TextMeshProUGUI>()[i].text = inputLetter; } } if (letterInWord == false) { incorrectGuesses++; hangmanStages[incorrectGuesses - 1].SetActive(true); } CheckOutcome(); } private void CheckOutcome() { if(correctGuesses == word.Length) //win { for(int i = 0; i < word.Length; i++) { wordContainer.GetComponentsInChildren<TextMeshProUGUI>()[i].color = Color.green; } Invoke("InitialiseGame", 3f); } if(incorrectGuesses == hangmanStages.Length) //lose { for (int i = 0; i < word.Length; i++) { wordContainer.GetComponentsInChildren<TextMeshProUGUI>()[i].color = Color.red; wordContainer.GetComponentsInChildren<TextMeshProUGUI>()[i].text = word[i].ToString(); } Invoke("InitialiseGame", 3f); } } }

  • @casetern1610
    @casetern1610 5 месяцев назад

    Such a good video with best explanation!!! You got a new Subscriber and hope so you will start posting again :)

    • @AlexJDev
      @AlexJDev 5 месяцев назад

      Thanks man! I’m working on a new video and should be regularly uploading soon!

  • @37dot3
    @37dot3 6 месяцев назад

    text doesnt change when i make a goal and the ball doesnt resets sorry for my english im german

  • @Leole192x
    @Leole192x 6 месяцев назад

    4:27

  • @TiredEyesStudio
    @TiredEyesStudio 7 месяцев назад

    Just wanted to share my stupidity here lol when I got to the Invoke method part of typing in Invoke("StartBall", 2f); and it wouldn't work meaning the ball never moved. I went back to see if I missed something, and I was like "I literally did this to the tee! So what the fuck is the problem here?" I spent the last three days learning all that I could about the Invoke method and its limits and even coroutines, and a couple minutes ago I watched this video again and realized....I typed in "Startball" instead of "StartBall".......I forgot to capitalize the B....and then the ball moved lmaoo three days to just figure out it was that. Wanted to share that. Great video! My mistake helped me learn more.

  • @danthon1267
    @danthon1267 7 месяцев назад

    Congratulations! You got a new subscriber! Now you have 158

  • @2.49d
    @2.49d 7 месяцев назад

    love you (no homo)

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

    Thank you so much it took a while to figure out what was going on but I made the game with your help thank you

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

    It works. To sleepy to write a longer comment.

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

    Currently 16 minutes in, is it normal for me to have a ton of compiler errors in the script at this point?

  • @jaidinwynn6584
    @jaidinwynn6584 9 месяцев назад

    My ball wont start and I’m not exactly sure why. I have no error in my code but it just won’t work

    • @Factland_
      @Factland_ 7 месяцев назад

      Make sure u wrote the function name correctly

  • @mjagatkar88
    @mjagatkar88 9 месяцев назад

    Ball ❌️ Bull ✅️ Thank You for this tutorial 🙏🏽

  • @PicoPizzazz
    @PicoPizzazz 9 месяцев назад

    THANK YOUUUUUUUUU

  • @ephraimcarter7918
    @ephraimcarter7918 10 месяцев назад

    Amazing video! I followed it and felt like I learned so much, however, the music drove me crazy.

  • @garrettblackard2288
    @garrettblackard2288 10 месяцев назад

    i only have one tip. ctrl mouse wheel in vs. had to break out my magnifying glass. but great stuff i needed the platform movement for something

  • @hiimdaisy946
    @hiimdaisy946 11 месяцев назад

    12:12 - the reason my ball was not bouncing was because i didnt add the ball material. so that is why i was stuck. heres the code, cause this fool doesnt understand the concept of zoom or how to enlarge the IDE. PlayerMovement Script 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerMovement : MonoBehaviour { [SerializeField] private float movementSpeed; [SerializeField] private bool isAI; [SerializeField] private GameObject ball; private Rigidbody2D rb; private Vector2 playerMove; void Start() { rb = GetComponent<Rigidbody2D>(); } // Update is called once per frame void Update() { if (isAI) { AIControl(); } else { PlayerControl(); } } private void PlayerControl() { //This controls the paddle somehow playerMove = new Vector2(0, Input.GetAxisRaw("Vertical")); } private void AIControl() { if(ball.transform.position.y > transform.position.y + 0.5f) { playerMove = new Vector2(0,1); } //This used to have a minus sign which for some reason caused the enemy AI to spaz out at the middle, so keep it at plus. //This causes the enemy AI to follow the ball like a laser guided missle. This is crazy man. It's like magic. else if(ball.transform.position.y < transform.position.y - 0.5f) { playerMove = new Vector2(0, -1); } else { playerMove = new Vector2(0, 0); } } private void FixedUpdate() { rb.velocity = playerMove * movementSpeed; } } BallMovement Script 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class BallMovement : MonoBehaviour { [SerializeField] private float initialSpeed = 10; [SerializeField] private float speedIncrease = 0.25f; [SerializeField] private Text playerScore; [SerializeField] private Text AIScore; private int hitCounter; private Rigidbody2D rb; // Start is called before the first frame update void Start() { rb = GetComponent<Rigidbody2D>(); Invoke("StartBall", 2f); } private void FixedUpdate() { rb.velocity = Vector2.ClampMagnitude(rb.velocity, initialSpeed + (speedIncrease * hitCounter)); } private void StartBall() { rb.velocity = new Vector2(-1, 0) * (initialSpeed + speedIncrease * hitCounter); } private void ResetBall() { rb.velocity = new Vector2(0, 0); transform.position = new Vector2(0, 0); hitCounter = 0; Invoke("StartBall", 2f); } private void PlayerBounce(Transform myObject) { hitCounter++; Vector2 ballPos = transform.position; Vector2 playerPos = myObject.position; float xDirection, yDirection; if(transform.position.x > 0) { xDirection = -1; } else { xDirection = 1; } yDirection = (ballPos.y - playerPos.y) / myObject.GetComponent<Collider2D>().bounds.size.y; if(yDirection == 0) { yDirection = 0.25f; } rb.velocity = new Vector2(xDirection, yDirection) * (initialSpeed + (speedIncrease * hitCounter)); } private void OnCollisionEnter2D(Collision2D collision) { if(collision.gameObject.name == "Player" || collision.gameObject.name == "AI") { PlayerBounce(collision.transform); } } private void OnTriggerEnter2D(Collider2D collision) { if(transform.position.x > 0) { ResetBall(); playerScore.text = (int.Parse(playerScore.text) + 1).ToString(); } else if(transform.position. x < 0) { ResetBall(); AIScore.text = (int.Parse(AIScore.text) + 1).ToString(); } } }

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

    Thank you so much!!!!!!!😀😀😀

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

    its not even letting me import the files (sfm all over again)

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

    Why can I not move my paddle at all?

    • @chasehicks6520
      @chasehicks6520 11 месяцев назад

      make sure vertical is capitalized "Vertical"

  • @Florea-on2zk
    @Florea-on2zk Год назад

    I've written the player movement script exactly the same but the movement: isAI: and Movement Speed: are just not showing up as variables. What have I done wrong?

  • @EkremKaya-zn3mb
    @EkremKaya-zn3mb Год назад

    why font so small,i can not see anything

  • @Tom.Vernon
    @Tom.Vernon Год назад

    Why does the ball stop dead on when it comes in contact with my racket or the wall?

    • @OINH17
      @OINH17 11 месяцев назад

      Have you addded the bounce physic to the gameObject?

    • @vandanavinni9132
      @vandanavinni9132 10 месяцев назад

      same here, can you please give the solution

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

    do you have this code

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

    I need a magnifying glass to be able to see what you wrote in the script, you could repeat the tutorial, but next time, when you work with the script, use scroll to enlarge the view... :))))

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

    Hello, your video was awesome. Good job!. I totally agree with creating a part two, you can add longer words and spaces

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

    My player doesnt move when i press any keys did i do something wrong

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

      did you fix it?

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

      @@reps2564 no i gave up especially since my uni switched to unreal engine sorry i cant provided tips

    • @Tom.Vernon
      @Tom.Vernon Год назад

      @@reps2564 If you are still working on it change ("vertical") in visual studio code to ("Vertical") also make sure you go to (in the unity editor) edit => project settings => input manager => axes => vertical, and make sure that is is defined as Vertical and also that your "w" and "s" keys are binded hope this helps

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

      @@reps2564 try writing the code again fixed for me

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

    love the minecraft bg music

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

    why my word container already destroy at start?

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

    Hi! I haven’t uploaded in a while but am looking to get back into the channel *soon*. Thanks for all the feedback, my apologies for how small the text is in vscode. Will definitely look at changing this next time! My style is going to change to more of a devlog with all code provided via GitHub at the end :)

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

      thanks Respected tutor

    • @danthon1267
      @danthon1267 7 месяцев назад

      Hope you come back soon!

    • @prerananayyar1953
      @prerananayyar1953 7 месяцев назад

      @@danthon1267do u know what he used to when he set up the project like a 2d or 3D

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

    Not really a tutorial since we just follow directions but great anyways 👍

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

    Why i can't get the same canvas as yours

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

    This tutorial Was awsome Thank you so much

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

    Bro why? Tutotial is good but I can't see any codes? they are very smaii

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

    It is not doing the scoring part it just bounces off of it

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

      if it's bouncing off the sides, it means that the 'startball' function isn't even triggering. It might be because you used onCollisionEnter instead of onCollision2D, or you might've messed up setting the triggers themselves. if you're talking about the paddles they're changing the speed not the score. vague question tho

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

      @@chumleechumbucket6625 ya sorry it is speeding up by the paddles but when it hits the walls behind the paddles it does not change the score or reset

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

      @@Reklaw096 in that case it either means you didn't set up the triggers or the ontriggerenter function properly. Double check that they're both set to 2D, that can be an issue

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

      @@chumleechumbucket6625 ok thanks I will try to see if that works later

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

    I'm blind like a mole, why didn't you make the code's font bigger 😑 But thank you tho, I'd been searching for this part with the ball going any direction depending on the angle!

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

    hey 👋 people are kinda right... ur speed isnt the issue cuz i can pause it, but u dont explain what things do. also u can increase writing size in VS code - so PLEASE do it for future tutorials if u still make them that is otherwise great video - loads of effort put into it idk if the game works or not cuz i didnt finish it - i cant see some of the stuff u type but the vid is nice, just work on these things maybe ^ GL 🥰

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

    really bad tutorial. you're going too fast and dont explain half of the things...

    • @2010platinumstar
      @2010platinumstar Год назад

      This was pretty easy to follow for me. You can rewind if you miss something.

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

      @@2010platinumstar At the time, I didn't really understand C#, because I thought I don't really need much knowledge about it because C# and Unity's C# are somewhat different. From then I've finished with learning C#, but I gave up on Unity because of the newest update. So, I would say that my lack of understanding C# did a pretty big part in not knowing what to do, but I can't really say he did a great job on this video.

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

    Is their a way of implementing a while loop to this so that it ends after the players or the AIs score reaches a certain number. And if there is could I have help with it please as I'm not sure how while loops work in unity. Thankyou in advance.

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

      you could put in if statements when it increases the score (more efficient than loops) and if the player/ai score is over a certain number you can run SceneManager.LoadScene(x); with x being the "name" or scene number. To use this, you'll have to state 'using UnityEngine.SceneManagement;' at the top. Then make 2 new scenes, one with some text saying you won and the other saying you lost, and maybe a replay button. I'm late to this and new to coding so you probably figured out something better already lol

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

    Also, when the ball hits my side, the counter doesnt go up... why?

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

    What's the background music?

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

    why did u quit?

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

      Sorry! I’ve been quite busy the past year. Will be looking at starting again in a different format shortly :)

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

    Besides the fact that you went a bit fast, and I got confused a couple times, I've had this issue so many times before, its not detecting the collision

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

    what does else { Destroy(gameObject); } do here? because i tried leaving it out and it still works.... as far as i'm aware the "private static" already takes care of the duplicates