Question by
MoRi92 · Apr 08, 2019 at 03:19 PM ·
programmingvariablesclass
Parent Class variable not saving child class
Hi! I have a Link class, from which two other classes derived (link_form and link_kinetic) and i have a variable for switching between the two of the of type Link but I can't make the link_selected variable be a link_form via script when calling the function. It just returns null.
public void ChangetoKinetic()
{
link_selected = Link_Kinetic.instance;
}
public void ChangetoShape()
{
link_selected = Link_Form.instance;
}
Comment