Skip to content

Commit

Permalink
Initial commit version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Morbeavus committed Oct 29, 2022
1 parent 0125125 commit 1dd36fb
Show file tree
Hide file tree
Showing 472 changed files with 41,144 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: trisgram
8 changes: 8 additions & 0 deletions Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions Editor/GUIHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
namespace Oculus.Platform
{
using UnityEditor;
using UnityEngine;

class GUIHelper {
public delegate void Worker();

static void InOut(Worker begin, Worker body, Worker end) {
try {
begin();
body();
} finally {
end();
}
}

public static void HInset(int pixels, Worker worker) {
InOut(
() => {
GUILayout.BeginHorizontal();
GUILayout.Space(pixels);
GUILayout.BeginVertical();
},
worker,
() => {
GUILayout.EndVertical();
GUILayout.EndHorizontal();
}
);
}

public delegate T ControlWorker<T>();
public static T MakeControlWithLabel<T>(GUIContent label, ControlWorker<T> worker) {
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField(label);

var result = worker();

EditorGUILayout.EndHorizontal();
return result;
}
}

}
12 changes: 12 additions & 0 deletions Editor/GUIHelper.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions Editor/Oculus.Platform.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Oculus.Platform.Editor",
"references": [
"Oculus.Platform"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"versionDefines": [
{
"name": "com.unity.xr.management",
"expression": "",
"define": "USING_XR_MANAGEMENT"
},
{
"name": "com.unity.xr.oculus",
"expression": "",
"define": "USING_XR_SDK_OCULUS"
}
]
}

7 changes: 7 additions & 0 deletions Editor/Oculus.Platform.Editor.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1dd36fb

Please sign in to comment.