There are two scripts A and B which extend C class and C extends MonoBehaviour and there is a G1 gameobject that has A and B scripts. And there is D script that has public C cVariable and is attached to G2 gameobject. In the inspector of the G2 I want to assign B component of G1 to cVariable of D script. But the A script is placed higher than B script and also can be assigned to cVariable. When I click on the little circle of the cVariable object field or drag my G1 gameobject to this field unity brings only A component. So how can I choose between A and B without moving up B script in the G1 inspector?
↧