예제 #1
0
        static void SetCloudServiceEnabled(string setting, bool enable)
        {
            MethodInfo InternalSetCloudServiceEnabled = PlayerSettingsType.GetMethod(
                "SetCloudServiceEnabled",
                BindingFlags.NonPublic | BindingFlags.Static);

            if (InternalSetCloudServiceEnabled == null)
            {
                return;
            }

            InternalSetCloudServiceEnabled.
            Invoke(null, new object[] { setting, enable });
        }
예제 #2
0
        internal static void SetCloudProjectId(string projectId)
        {
            MethodInfo InternalSetCloudProjectId = PlayerSettingsType.GetMethod(
                "SetCloudProjectId",
                BindingFlags.NonPublic | BindingFlags.Static);

            if (InternalSetCloudProjectId == null)
            {
                Debug.LogWarning(PlasticLocalization.GetString(
                                     PlasticLocalization.Name.CannotWriteCloudProjectId));
                return;
            }

            InternalSetCloudProjectId.Invoke(
                null, new object[] { projectId });
        }
예제 #3
0
    static CommonReflectedTypeInfo()
    {
        PlayerSettingManagerType = ReflectionHelper.FindType("Assets.Scripts.Settings.PlayerSettingsManager");
        if (PlayerSettingManagerType != null)
        {
            PlayerSettingsManagerInstanceField       = PlayerSettingManagerType.GetField("instance", BindingFlags.NonPublic | BindingFlags.Static);
            PlayerSettingsManagerPlayerSettingsField = PlayerSettingManagerType.GetField("playerSettings", BindingFlags.NonPublic | BindingFlags.Instance);
            PlayerSettingManagerSaveSettingsMethod   = PlayerSettingManagerType.GetMethod("SavePlayerSettings", BindingFlags.Public | BindingFlags.Instance);
        }

        PlayerSettingsType = ReflectionHelper.FindType("Assets.Scripts.Settings.PlayerSettings");
        if (PlayerSettingsType != null)
        {
            PlayerSettingLockMouseField = PlayerSettingsType.GetField("LockMouseToWindow", BindingFlags.Public | BindingFlags.Instance);
        }
    }
예제 #4
0
        static void SetCloudProjectId(string projectId)
        {
            MethodInfo InternalSetCloudProjectId = PlayerSettingsType.GetMethod(
                "SetCloudProjectId",
                BindingFlags.NonPublic | BindingFlags.Static);

            if (InternalSetCloudProjectId == null)
            {
                Debug.LogWarning(
                    "Cannot write cloudProjectId: " +
                    "Method PlayerSettings.SetCloudProjectId not found");
                return;
            }

            InternalSetCloudProjectId.Invoke(
                null, new object[] { projectId });
        }