Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

I just override my attack method but, I stuck in null ref. Please take a look!!

Discussion in 'Scripting' started by SUfIaNAHMAD_, Sep 10, 2020.

?

How to reference a override method

  1. Polymorphisum

    0 vote(s)
    0.0%
  2. Inheritance

    0 vote(s)
    0.0%
  1. SUfIaNAHMAD_

    SUfIaNAHMAD_

    Joined:
    Jun 19, 2019
    Posts:
    18
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,711
    Screenshots of code are useless. Please use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/

    Some notes on how to fix a NullReferenceException error in Unity3D
    - also known as: Unassigned Reference Exception
    - also known as: Missing Reference Exception

    http://plbm.com/?p=221

    The basic steps outlined above are:
    - Identify what is null
    - Identify why it is null
    - Fix that.

    Expect to see this error a LOT. It's easily the most common thing to do when working. Learn how to fix it rapidly. It's easy. See the above link for more tips.
     
    SUfIaNAHMAD_ and Joe-Censored like this.
  3. SUfIaNAHMAD_

    SUfIaNAHMAD_

    Joined:
    Jun 19, 2019
    Posts:
    18
    Thanks! I will take care of it :)