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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Inheriting from a class passing as parent type.

Discussion in 'Scripting' started by bladefire999, Apr 1, 2020.

  1. bladefire999

    bladefire999

    Joined:
    Mar 18, 2020
    Posts:
    2
    I have an Item base class that all my item types inherit from and I have scripts that use this base class as a variable to run functions on the item. I am trying to figure out how to pass my scripts the child class that inherits from the base. Unity won't let me drop the new class on to the base class public input.
     
  2. bladefire999

    bladefire999

    Joined:
    Mar 18, 2020
    Posts:
    2
    I solved the problem. It was a scriptable object so I had to create it through the menu...