Skip to content

Commit

Permalink
Change ApplyShaders default value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eusth committed Sep 28, 2016
1 parent 19e3552 commit a9be00b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 16 additions & 3 deletions HoneySelectVR/HoneySelectVR.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using IllusionPlugin;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEngine;
Expand All @@ -11,6 +12,8 @@ namespace HoneySelectVR
{
public class HoneySelectVR : IEnhancedPlugin
{
private const String NEW_DEFAULT_TOKEN = "Plugins\\VR\\.vr2";

public string[] Filter
{
get
Expand Down Expand Up @@ -41,9 +44,19 @@ public void OnApplicationQuit()

public void OnApplicationStart()
{
if (Environment.CommandLine.Contains("--vr"))
{
VRManager.Create<HoneyInterpreter>(new HoneyContext());
if (Environment.CommandLine.Contains("--vr")) {
var context = new HoneyContext();
var settings = context.Settings as HoneySettings;

// Enforce new default
if(!File.Exists(NEW_DEFAULT_TOKEN)) {
File.Create(NEW_DEFAULT_TOKEN);

settings.ApplyShaders = true;
settings.Save();
}

VRManager.Create<HoneyInterpreter>(context);
VR.Manager.SetMode<HoneySeatedMode>();
}
}
Expand Down
3 changes: 2 additions & 1 deletion HoneySelectVR/HoneySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace HoneySelectVR
[XmlRoot("Settings")]
public class HoneySettings : VRSettings
{
public bool ApplyShaders { get; set; }
public bool ApplyShaders { get { return _ApplyShaders; } set { _ApplyShaders = value; } }
private bool _ApplyShaders = true;
}
}

0 comments on commit a9be00b

Please sign in to comment.