How to save Component

Hello everyone,

Hello everyone,

I like to save the interactable to be false after clicked.
Now when the game restart or shutdown the interactable is clickable
it needs to be false. So later i want reward the player after showing a video and then the button interactable will be true.
Only I can’t find a solution to this.

    public void BtnOnClick()
    {
        gameObject.GetComponent<Button>().interactable = false;
    }

Use Playerprefs to save simple variables (int, float, string).

Look them up, if you dont know how to use them.

You could save “interacteable” into an int. 0 = not interacteable, 1 = interacteable

Good luck :smiley: