Search Unity

유니티 리셋 버그 ㅠㅠ

Discussion in 'Scripting' started by hyochan, Jan 8, 2022.

  1. hyochan

    hyochan

    Joined:
    Jan 8, 2022
    Posts:
    2
    조코딩님 Flappy bird 강의 따라하다가 3강 8분 구역에서 스프라이트가 모두 보이지 않고 플레이를 해봐도 컴퍼스 빼고는 모두 작동하지를 않습니다. 어떻게 해야할까요ㅠㅠ
     
  2. hyochan

    hyochan

    Joined:
    Jan 8, 2022
    Posts:
    2
    Console 창에서는
    'ArgumentNullException: Value cannot be null.
    Parameter name: source
    UnityEngine.AudioSource.Play () (at <8e2857b79be4468ca1c28dda75978191>:0)
    BirdJump.Update () (at Assets/BirdJump.cs:23)'
    라고 뜨네요.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,459
    This is the 2D forum and your post has nothing to do with 2D features or issues. You don't actually ask a question although we can guess you're following a tutorial(?) and have got it wrong because you've got an ArgumentNullException.

    The error clearly tells you the problem though; you're passing a NULL on Line 23 to the AudioSource.Play call. It even tells you the specific argument that is NULL. Probably because you have a field of type "AudioSource" but it's not been assigned to anything yet.

    Your post belongs on the scripting forum here so I'll move it.
     
    Bunny83 likes this.