W
W
WasTabon2021-03-17 19:41:05
Unity
WasTabon, 2021-03-17 19:41:05

Why boolean = false?

public bool IsFree = true;

public void CreateOS()
    {
        Debug.Log(IsFree);
    }

605230fb7a61a987847583.png

But when clicking on the button (CreateOS method) outputs False, not True

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wichidt, 2021-03-17
@wichidt

public void CreateOS(bool ToggleStatus){ 
        Debug.Log(ToggleStatus);
}

And in OnValueChanged point to the CreateOS() method
60523d2c41c60771556627.png
60523d450cca4174017963.png
60523d5d81154045893114.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question