private void Awake() { sharedPrefPlugin = SharedPrefPlugin.GetInstance(); sharedPrefPlugin.SetDebug(0); sharedPrefPlugin.Init(); sharedPrefNameKey = "sampleSharedPrefName"; sampleStringKey = "someString"; sampleIntKey = "someInt"; }
public static SharedPrefPlugin GetInstance() { if (instance == null) { container = new GameObject(); container.name = "SharedPrefPlugin"; instance = container.AddComponent(typeof(SharedPrefPlugin)) as SharedPrefPlugin; DontDestroyOnLoad(instance.gameObject); aupHolder = AUPHolder.GetInstance(); instance.gameObject.transform.SetParent(aupHolder.gameObject.transform); } return(instance); }