Beispiel #1
0
    private void Awake()
    {
        sharedPrefPlugin = SharedPrefPlugin.GetInstance();
        sharedPrefPlugin.SetDebug(0);
        sharedPrefPlugin.Init();

        sharedPrefNameKey = "sampleSharedPrefName";
        sampleStringKey   = "someString";
        sampleIntKey      = "someInt";
    }
Beispiel #2
0
    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);
    }