Skip to content

Commit 911f6c7

Browse files
committed
Updated CHANGES.md and added comments.
1 parent f2d8bab commit 911f6c7

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/src/DisplayInterface.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ namespace Unity
3636
/// </summary>
3737
public class DisplayInterface : MonoBehaviour
3838
{
39-
const string HmdJsonFileName = "hmd.json";
39+
const string HmdJsonFileName = "hmd.json"; //hardcoded filename of hmd config in Data folder
4040
private string _deviceDescriptorJson; //a string that is the JSON file to be parsed
4141
public TextAsset JsonDescriptorFile; //drop the json file into this slot in the Unity inspector
4242

4343
public bool Initialized
4444
{
4545
get { return _initialized; }
4646
}
47-
private bool _initialized = false;
47+
private bool _initialized = false; //flag set when _deviceDescriptorJson has data
4848

4949
void Awake()
5050
{
@@ -67,11 +67,12 @@ void Awake()
6767
_deviceDescriptorJson = ClientKit.instance.context.getStringParameter("/display"); //otherwise read from /display
6868
}
6969
_initialized = true;
70-
}
71-
72-
70+
}
7371
}
7472

73+
//coroutine for loading an external json config file
74+
//this could be more generic, but I'm not sure we will be loading external files
75+
//this will eventually go away anyway when we get display config data from /display
7576
private IEnumerator LoadJsonFile(string filePath)
7677
{
7778
WWW jsonFile = new WWW("file://"+filePath);
@@ -80,9 +81,6 @@ private IEnumerator LoadJsonFile(string filePath)
8081
_deviceDescriptorJson = jsonFile.text;
8182
}
8283

83-
84-
85-
8684
/// <summary>
8785
/// This function will parse the device parameters from a device descriptor json file.
8886
///

OSVR-Unity/CHANGES.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
This is an abbreviated changelog for the OSVR Unity Plugin.
44

55
Use git for a full changelog.
6-
##Recent Changes (updated 18-March-2015)
7-
##Distortion (20-March-2015)
6+
##Recent Changes (updated 28-March-2015)
7+
##External Json File v0.1-56-gf2d8bab (20-March-2015)
8+
- The JSON file containing display configuration can now be read from a file at runtime. To do this, add a config file "hmd.json" to the _Data folder that is created in a build. The format of the JSON file has not changed at all. It is the same file you would drag-and-drop onto the DisplayInterface component on your VRDisplayTracked prefab. If "hmd.json" does not exist in the Data folder (and it won't by default unless you put it there), then the plugin will look for the JSON file assigned in the DisplayInterface component in your scene. If that also has not been assigned, it will fall back to reading OSVR's /display parameter (this will eventually be the default).
9+
10+
##Distortion v0.1-55-g046c709(20-March-2015)
811
- Unity 4 Free limitations. The new distortion shader will not work with Unity 4 Free version. It will work with Unity 4 Pro or Unity 5. If you are using Unity 4 Free, everything will still work but there won't be any distortion. This is due to the distortion shader using a render to texture pass.
912
- Fixed Timestep was changed from 0.2 to 0.01667. This is how often FixedUpdate() gets called. The change should result in a more comfortable VR experience, but make sure it doesn't break any physics in your game.
1013
- Changed the default quality settings. Turned on 4x AA and disabled shadows.
1114

12-
##Unity 5 Update (updated 18-March-2015)
15+
##Unity 5 Update v0.1-55-g046c709 (updated 18-March-2015)
1316
- Refactored VRHead.cs and VREye.cs to be Unity 5-friendly (mostly instances of "camera" that needed to become GetComponent<Camera>()). Upgrading from Unity 4 to Unity 5 should be seamless.
1417
- VRDisplayTracked.prefab has been updated to use the json descriptor file for the HDK by default. If you are using another HMD, be sure to set the corresponding json file on the VRDisplayTracked prefab's DisplayInterface script.
1518
- Fixed issue with stereo overlap and roll for HMDs with multiple video inputs.

0 commit comments

Comments
 (0)