Add a setting to hide socials from main menu
This commit is contained in:
12
Assets/Scripts/HideIfSettingFalse.cs
Normal file
12
Assets/Scripts/HideIfSettingFalse.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HideIfSettingFalse : MonoBehaviour
|
||||
{
|
||||
public string setting;
|
||||
public bool reverse;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
gameObject.SetActive(PlayerPrefs.GetInt(setting, 0) == (reverse ? 0 : 1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user