This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) Meta Platforms, Inc. and affiliates. | |
* All rights reserved. | |
* | |
* Licensed under the Oculus SDK License Agreement (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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you're in an infinite loop in Unity, it will hang, and you won't be able to hit the Play button to exit Play mode. | |
// If you happen to be attached to the Visual Studio debugger, and if you can hit a breakpoint somewhere in the executing infinite loop, | |
// You have hope! | |
// You can use Immediate Window to issue a command that will break you out of the infinite loop | |
// After the breakpoint is hit in Visual Studio, open up the Immediate Window (Debug->Windows->Immediate Window) | |
// Type this command and hit enter: | |
// DestroyImmediate(this); | |
// It will give an error in Unity, and it will destroy the offending GameObject with all its scripts including the infinite loop script | |
// But now you can hit the Play button to exit Play Mode. | |
// Now fix that dang script before running it again! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SerializeField] private AudioSource _linkedAudioSource = null; | |
[SerializeField] private float _minRmsValue = 0.0001f; // minimum to consider "talking" | |
[SerializeField] private Renderer _rendererToCheckVisibility = null; | |
[SerializeField] private float _jawTalkSpeed = 0.12f; | |
private JawStates _jawState = JawStates.Default; | |
private float[] _samples = new float[512]; // For spectrum data | |
private float _rmsValue; // Root mean square, representing audio level | |
public enum JawStates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
[CustomEditor(typeof(GameObject), true)] | |
[CanEditMultipleObjects] | |
public class CustomGameObjectInspector : Editor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class F10ApplicationQuit : MonoBehaviour { | |
public KeyCode keyCode = KeyCode.F10; | |
// Update is called once per frame | |
void Update () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class F5ReloadScene : MonoBehaviour { | |
public KeyCode keyCode = KeyCode.F5; | |
// Update is called once per frame | |
void Update () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
using System; | |
using UnityEngine.Events; | |
[RequireComponent(typeof(AudioSource))] | |
public class CheatCodeDetector : MonoBehaviour | |
{ | |
[SerializeField] private List<Cheat> cheats = new List<Cheat>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace Gamekit2D | |
{ | |
public class ScreenFader : MonoBehaviour | |
{ | |
public enum FadeType | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[SelectionBase] | |
public class SelectionBase : MonoBehaviour { | |
} |
NewerOlder