SubClass MagicProjectile

devomage

Member
I made a SubClass of MagicProjectile.

https://pastebin.com/DAYGKfvd

The extra variables are not showing in the inspector. It is weird that the base script info is only shown in the inspector AND the new variables that should be there are not.

Do I need to create a custom Inspector script? Weird, because I haven't needed a custom inspector for any other SubClass scripts.
 

Attachments

  • inspector.png
    inspector.png
    47.5 KB · Views: 2
The MagicItemInspector doesn't draw for subclassed objects, but I'll change it so it does.
Code:
[CustomEditor(typeof(MagicItem), true)]
For new variables you will need to subclass the MagicItemInspector script.
 
Top