Hey guys, quick question…
I have my base class setup this way:
using UnityEngine;
using System.Collections;
public class PowerUp : MonoBehaviour {
public bool displayIcon = true;
public Texture2D icon;
public Vector2 iconPosition = Vector3.zero;
public int uses = 5;
public float passiveLifetime = 20;
[HideInInspector] public bool isActive = false;
[HideInInspector] public bool isPassive = false;
[HideInInspector] public float dieAt = 0;
// Functions and more below....
}
Now I have my derived class:
using UnityEngine;
using System.Collections;
public class StickyWheels : PowerUp {
public Texture2D stickyWheelsIcon;
void Start() {
// Init stuff...
}
}
All the public fields show up in the inspector on both classes. But I really don’t need them to be displayed on the base class, since they are different based on the object the scripts are attached too.
Is it possible to force the public fields to be hidden on the base script, and only have them visible on the derived class?
Thanks for your time guys!
Stephane