public class WallProperties : MonoBehaviour
{
public Door door;
public bool IsDoor(bool enable) //enable=true
{
if(enable)
{
print (enable); //prints true
door=new Door();
door.DoorStart(); //sets values to default
print(door.GetStyle ()); //prints current value
print ((door==null)?"True":"False"); //prints true
}
return(door==null); //returns true
}
...
}
- I am trying to have the 'door' variable not NULL
- The mono class is not attached to anything
- It gave me lip when the "new Door()" was removed
- With the "new Door()" I am able to access the Door class