Skip to content

Commit b62350f

Browse files
committed
Can now be imported as a custom package, with some bugs.
1 parent 4e1545f commit b62350f

122 files changed

Lines changed: 5269 additions & 1702 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 0 additions & 119 deletions
This file was deleted.

Demos/CubeRotation.cs.meta

Lines changed: 0 additions & 12 deletions
This file was deleted.

Demos/StreamInfo.cs.meta

Lines changed: 0 additions & 12 deletions
This file was deleted.

Documentation~/LSL4Unity.md

Whitespace-only changes.

Editor.meta

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/BuildHooks.cs

Lines changed: 0 additions & 72 deletions
This file was deleted.

Editor/BuildHooks.cs.meta

Lines changed: 0 additions & 12 deletions
This file was deleted.

Editor/LSLEditorIntegration.cs

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Linq;
55
using UnityEngine.Assertions;
66

7-
namespace Assets.LSL4Unity.EditorExtensions
7+
namespace LSL4Unity.EditorExtensions
88
{
99
public class LSLEditorIntegration
1010
{
@@ -16,10 +16,6 @@ public class LSLEditorIntegration
1616
public const string SO_ENDING = ".so";
1717
public const string BUNDLE_ENDING = ".bundle";
1818

19-
static readonly string wrapperFileName = "LSL.cs";
20-
static readonly string assetSubFolder = "LSL4Unity";
21-
static readonly string libFolder = "Plugins";
22-
2319
[MenuItem("LSL/Show Streams")]
2420
static void OpenLSLWindow()
2521
{
@@ -29,40 +25,5 @@ static void OpenLSLWindow()
2925

3026
window.ShowUtility();
3127
}
32-
33-
[MenuItem("LSL/Show Streams", true)]
34-
static bool ValidateOpenLSLWindow()
35-
{
36-
string assetDirectory = Application.dataPath;
37-
38-
bool lib64Available = false;
39-
bool lib32Available = false;
40-
bool apiAvailable = false;
41-
42-
43-
var results = Directory.GetDirectories(assetDirectory, assetSubFolder, SearchOption.AllDirectories);
44-
45-
Assert.IsTrue(results.Any(), "Expecting a directory named: '" + assetSubFolder + "' containing the content inlcuding this script! Did you renamed it?");
46-
47-
var root = results.Single();
48-
49-
lib32Available = File.Exists(Path.Combine(root, Path.Combine(libFolder, lib32Name + DLL_ENDING)));
50-
lib64Available = File.Exists(Path.Combine(root, Path.Combine(libFolder, lib64Name + DLL_ENDING)));
51-
52-
lib32Available &= File.Exists(Path.Combine(root, Path.Combine(libFolder, lib32Name + SO_ENDING)));
53-
lib64Available &= File.Exists(Path.Combine(root, Path.Combine(libFolder, lib64Name + SO_ENDING)));
54-
55-
lib32Available &= File.Exists(Path.Combine(root, Path.Combine(libFolder, lib32Name + BUNDLE_ENDING)));
56-
lib64Available &= File.Exists(Path.Combine(root, Path.Combine(libFolder, lib64Name + BUNDLE_ENDING)));
57-
58-
apiAvailable = File.Exists(Path.Combine(root, wrapperFileName));
59-
60-
if ((lib64Available || lib32Available) && apiAvailable)
61-
return true;
62-
63-
Debug.LogError("LabStreamingLayer libraries not available! See " + wikiURL + " for installation instructions");
64-
return false;
65-
}
66-
6728
}
6829
}

Editor/LSLEditorIntegration.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/LSLEditorWindow.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using LSL;
44
using System.Collections.Generic;
55

6-
namespace Assets.LSL4Unity.EditorExtensions
6+
namespace LSL4Unity.EditorExtensions
77
{
88
public class LSLShowStreamsWindow : EditorWindow
99
{
@@ -18,15 +18,15 @@ public class LSLShowStreamsWindow : EditorWindow
1818
private Vector2 scrollVector;
1919
private string streamLookUpResult;
2020

21-
private liblsl.ContinuousResolver resolver;
21+
private ContinuousResolver resolver;
2222
private string lslVersionInfos;
2323

2424
public void Init()
2525
{
26-
resolver = new liblsl.ContinuousResolver();
26+
resolver = new ContinuousResolver();
2727

28-
var libVersion = liblsl.library_version();
29-
var protocolVersion = liblsl.protocol_version();
28+
var libVersion = LSL.LSL.library_version();
29+
var protocolVersion = LSL.LSL.protocol_version();
3030

3131
var lib_major = libVersion / 100;
3232
var lib_minor = libVersion % 100;
@@ -38,7 +38,7 @@ public void Init()
3838
this.titleContent = new GUIContent("LSL Utility");
3939
}
4040

41-
liblsl.StreamInfo[] streamInfos = null;
41+
StreamInfo[] streamInfos = null;
4242

4343
void OnGUI()
4444
{

0 commit comments

Comments
 (0)