12 lines
236 B
C#
12 lines
236 B
C#
using UnityEngine;
|
|
|
|
public class HideIfSettingFalse : MonoBehaviour
|
|
{
|
|
public string setting;
|
|
public bool reverse;
|
|
|
|
void Awake()
|
|
{
|
|
gameObject.SetActive(PlayerPrefs.GetInt(setting, 0) == (reverse ? 0 : 1));
|
|
}
|
|
} |