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 }); }
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 }); }
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); } }
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 }); }