Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh #64

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ sysinfo.txt
*.apk
*.unitypackage

.Quest App Launcher.exe
.Quest App Launcher_Data

Logs/
8 changes: 8 additions & 0 deletions Assets/AssetBundles.meta

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

8 changes: 8 additions & 0 deletions Assets/Editor.meta

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

11 changes: 11 additions & 0 deletions Assets/Editor/BuildAssetBundles.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using UnityEditor;

public class CreateAssetBundles
{

[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles()
{
BuildPipeline.BuildAssetBundles("Assets/AssetBundles", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
}
}
11 changes: 11 additions & 0 deletions Assets/Editor/BuildAssetBundles.cs.meta

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

50 changes: 50 additions & 0 deletions Assets/Editor/PrefabCleanup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEditor;

public class NullComponentAndMissingPrefabSearchTool
{
[MenuItem("Tools/Log Missing Prefabs And Components")]
public static void Search()
{
results.Clear();
GameObject[] gos = SceneManager.GetActiveScene().GetRootGameObjects();
foreach (GameObject go in gos) Traverse(go.transform);
Debug.Log("> Total Results: " + results.Count);
foreach (string result in results) Debug.Log("> " + result);
}

private static List<string> results = new List<string>();
private static void AppendComponentResult(string childPath, int index)
{
results.Add("Missing Component " + index + " of " + childPath);
}
private static void AppendTransformResult(string childPath, string name)
{
results.Add("Missing Prefab for \"" + name + "\" of " + childPath);
}
private static void Traverse(Transform transform, string path = "")
{
string thisPath = path + "/" + transform.name;
Component[] components = transform.GetComponents<Component>();
for (int i = 0; i < components.Length; i++)
{
if (components[i] == null) AppendComponentResult(thisPath, i);
}
for (int c = 0; c < transform.childCount; c++)
{
Transform t = transform.GetChild(c);
PrefabAssetType pt = PrefabUtility.GetPrefabAssetType(t.gameObject);
if (pt == PrefabAssetType.MissingAsset)
{
AppendTransformResult(path + "/" + transform.name, t.name);
} else
{
Traverse(t, thisPath);
}
}
}
}
#endif
11 changes: 11 additions & 0 deletions Assets/Editor/PrefabCleanup.cs.meta

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

10 changes: 0 additions & 10 deletions Assets/OVRInputSelection/InputSystem/OVRInputHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,6 @@ public static OVRInput.Controller GetConnectedControllers(HandFilter filter = Ha
return OVRInput.Controller.LTouch;
}

if (((filter & HandFilter.Right) == HandFilter.Right) && (controller & OVRInput.Controller.RTrackedRemote) == OVRInput.Controller.RTrackedRemote)
{
return OVRInput.Controller.RTrackedRemote;
}

if (((filter & HandFilter.Left) == HandFilter.Left) && (controller & OVRInput.Controller.LTrackedRemote) == OVRInput.Controller.LTrackedRemote)
{
return OVRInput.Controller.LTrackedRemote;
}

controller = OVRInput.Controller.None;
if (OVRPlugin.GetHandTrackingEnabled())
{
Expand Down
6 changes: 2 additions & 4 deletions Assets/OVRInputSelection/InputSystem/OVRRawRaycaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,8 @@ void ProcessButtonPresses(OVRInput.Controller activeController, bool isLeft, Tra
{
// Handle selection callbacks. An object is selected if the button selecting it was
// pressed AND released while hovering over the object.
if (isLeft && (activeController & OVRInput.Controller.LTouch) != OVRInput.Controller.LTouch &&
(activeController & OVRInput.Controller.LTrackedRemote) != OVRInput.Controller.LTrackedRemote ||
!isLeft && (activeController & OVRInput.Controller.RTouch) != OVRInput.Controller.RTouch &&
(activeController & OVRInput.Controller.RTrackedRemote) != OVRInput.Controller.RTrackedRemote)
if (isLeft && (activeController & OVRInput.Controller.LTouch) != OVRInput.Controller.LTouch ||
!isLeft && (activeController & OVRInput.Controller.RTouch) != OVRInput.Controller.RTouch)
{
return;
}
Expand Down
19 changes: 15 additions & 4 deletions Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ public enum Fade {
static public bool SoundEnabled { get { return soundEnabled; } }

static readonly AnimationCurve defaultReverbZoneMix = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } );

// Calculate the maximum number of emitters that can be running at one time.
static private int CalculateMaxEmittersSize() {
return theAudioManager.maxSoundEmitters + (int)EmitterChannel.Any;
}

// Verify if this index is valid
static private bool ValidateEmitterIndex(int index) {
return index > -1 && index < CalculateMaxEmittersSize();
}


/*
-----------------------
Expand All @@ -79,7 +90,7 @@ void InitializeSoundSystem() {
}

// we allocate maxSoundEmitters + reserved channels
soundEmitters = new SoundEmitter[maxSoundEmitters+(int)EmitterChannel.Any];
soundEmitters = new SoundEmitter[CalculateMaxEmittersSize()];

// see if the sound emitters have already been created, if so, nuke it, it shouldn't exist in the scene upon load
soundEmitterParent = GameObject.Find( "__SoundEmitters__" );
Expand All @@ -90,7 +101,7 @@ void InitializeSoundSystem() {

// create them all
soundEmitterParent = new GameObject( "__SoundEmitters__" );
for ( int i = 0; i < maxSoundEmitters + (int)EmitterChannel.Any; i++ ) {
for ( int i = 0; i < CalculateMaxEmittersSize(); i++ ) {
GameObject emitterObject = new GameObject( "SoundEmitter_" + i );
emitterObject.transform.parent = soundEmitterParent.transform;
emitterObject.transform.position = Vector3.zero;
Expand Down Expand Up @@ -640,7 +651,7 @@ static public int PlaySoundAt( Vector3 position, AudioClip clip, float volume =
-----------------------
*/
public static void SetOnFinished( int emitterIdx, System.Action onFinished ) {
if ( emitterIdx >= 0 && emitterIdx < theAudioManager.maxSoundEmitters ) {
if ( ValidateEmitterIndex(emitterIdx) ) {
theAudioManager.soundEmitters[emitterIdx].SetOnFinished( onFinished );
}
}
Expand All @@ -651,7 +662,7 @@ public static void SetOnFinished( int emitterIdx, System.Action onFinished ) {
-----------------------
*/
public static void SetOnFinished( int emitterIdx, System.Action<object> onFinished, object obj ) {
if ( emitterIdx >= 0 && emitterIdx < theAudioManager.maxSoundEmitters ) {
if ( ValidateEmitterIndex(emitterIdx) ) {
theAudioManager.soundEmitters[emitterIdx].SetOnFinished( onFinished, obj );
}
}
Expand Down
8 changes: 5 additions & 3 deletions Assets/Oculus/OculusProjectConfig.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 05d394ae2a81edd4cbc3c51917e766e3, type: 3}
m_Name: OculusProjectConfig
m_EditorClassIdentifier:
targetDeviceTypes: 01000000
targetDeviceTypes: 0100000002000000
handTrackingSupport: 1
colorGamut: 0
disableBackups: 1
enableNSCConfig: 1
focusAware: 0
securityXmlPath:
skipUnneededShaders: 0
focusAware: 1
requiresSystemKeyboard: 0
4 changes: 2 additions & 2 deletions Assets/Oculus/OculusProjectConfig.asset.meta

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ public override void OnInspectorGUI()

var useStandaloneLabel = "Use Standalone Platform [?]";
var useStandaloneHint = "If this is checked your app will use a debug platform with the User info below. "
+ "Otherwise your app will connect to the Oculus Platform. This setting only applies to the Unity Editor";
+ "Otherwise your app will connect to the Oculus Platform. This setting only applies to the Unity Editor on Windows";

#if !UNITY_STANDALONE_WIN
PlatformSettings.UseStandalonePlatform = false;
GUI.enabled = false;
#endif
PlatformSettings.UseStandalonePlatform =
MakeToggle(new GUIContent(useStandaloneLabel, useStandaloneHint), PlatformSettings.UseStandalonePlatform);

Expand Down
22 changes: 0 additions & 22 deletions Assets/Oculus/Platform/Editor/OculusPluginUpdaterStub.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/************************************************************************************

Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.

Licensed under the Oculus SDK License Version 3.4.1 (the "License");
you may not use the Oculus SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.

You may obtain a copy of the License at

https://developer.oculus.com/licenses/sdk-3.4.1

Unless required by applicable law or agreed to in writing, the Oculus SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

************************************************************************************/

using UnityEngine;
using System.Collections;

Expand All @@ -27,4 +6,3 @@ public class OculusPluginUpdaterStub : ScriptableObject
// Stub helper class to locate script paths through Unity Editor API.
// Required to be a standalone class in a separate file or else MonoScript.FromScriptableObject() returns an empty string path.
}

2 changes: 1 addition & 1 deletion Assets/Oculus/Platform/Oculus.Platform.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"define": "USING_XR_SDK_OCULUS"
}
]
}
}
2 changes: 1 addition & 1 deletion Assets/Oculus/Platform/Oculus.Platform.asmdef.meta

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

Binary file not shown.

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

Binary file not shown.

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

2 changes: 1 addition & 1 deletion Assets/Oculus/Platform/Scripts/AbuseReportOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void SetReportType(AbuseReportType value) {
}


// For passing to native C
/// For passing to native C
public static explicit operator IntPtr(AbuseReportOptions options) {
return options != null ? options.Handle : IntPtr.Zero;
}
Expand Down
2 changes: 2 additions & 0 deletions Assets/Oculus/Platform/Scripts/AbuseReportType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ public enum AbuseReportType : int
[Description("UNKNOWN")]
Unknown,

/// A report for something besides a user, like a world.
[Description("OBJECT")]
Object,

/// A report for a user's behavior or profile.
[Description("USER")]
User,

Expand Down
28 changes: 28 additions & 0 deletions Assets/Oculus/Platform/Scripts/AbuseReportVideoMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!

namespace Oculus.Platform
{

using Description = System.ComponentModel.DescriptionAttribute;

public enum AbuseReportVideoMode : int
{
[Description("UNKNOWN")]
Unknown,

/// The UI will collect video evidence if the object_type supports it.
[Description("COLLECT")]
Collect,

/// The UI will try to collect video evidence if the object_type supports it,
/// but will allow the user to skip that step if they wish.
[Description("OPTIONAL")]
Optional,

/// The UI will not collect video evidence.
[Description("SKIP")]
Skip,

}

}
11 changes: 11 additions & 0 deletions Assets/Oculus/Platform/Scripts/AbuseReportVideoMode.cs.meta

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

Loading