This file contains hidden or 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; | |
[ExecuteInEditMode()] | |
public class RectTransformLockPosition : MonoBehaviour | |
{ | |
private RectTransform rectTransform; | |
private Vector3 startPosition; | |
protected void Awake() | |
{ |
This file contains hidden or 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 UnityEngine.UI; | |
public class SlidableMask : MonoBehaviour | |
{ | |
[SerializeField] | |
private Slider slider; | |
private RectTransform rectTransform; | |
private Vector3 farLeft; |
This file contains hidden or 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; | |
public class BallBouncer : MonoBehaviour | |
{ | |
[SerializeField] | |
[Tooltip("Just for debugging, adds some velocity during OnEnable")] | |
private Vector3 initialVelocity; | |
[SerializeField] | |
private float minVelocity = 10f; |
This file contains hidden or 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 BounceTowardPlayer : MonoBehaviour | |
{ | |
[SerializeField] | |
[Range(0f, 1f)] | |
[Tooltip("0 = regular bounce ignoring player | 1 = direct to the player")] | |
private float bias = 0.5f; |
This file contains hidden or 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
MonoBehaviour: | |
m_ObjectHideFlags: 0 | |
m_PrefabParentObject: {fileID: 0} | |
m_PrefabInternal: {fileID: 0} | |
m_GameObject: {fileID: 358054850} | |
m_Enabled: 1 | |
m_EditorHideFlags: 0 | |
m_Script: {fileID: 11500000, guid: bbca3633a7e3a1b478017e8d1bbf5892, type: 3} | |
m_Name: | |
m_EditorClassIdentifier: |
This file contains hidden or 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; | |
public class ExampleScript : MonoBehaviour | |
{ | |
[SerializeField] | |
private float floatValue; | |
[SerializeField] | |
private Camera cameraReference; | |
} |
This file contains hidden or 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; | |
public class ExampleScript : MonoBehaviour | |
{ | |
[SerializeField] | |
private float floatValueRenamed; | |
[SerializeField] | |
private Camera cameraReferenceRenamed; | |
} |
This file contains hidden or 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 UnityEngine.Serialization; | |
public class ExampleScript : MonoBehaviour | |
{ | |
[SerializeField] | |
[FormerlySerializedAs("floatValue")] | |
private float floatValueRenamed; | |
[SerializeField] |
This file contains hidden or 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; | |
public class JetpackBasic : MonoBehaviour | |
{ | |
private Rigidbody body; | |
private SteamVR_TrackedController controller; | |
[SerializeField] | |
private float thrustMultipler = 14f; |
This file contains hidden or 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; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class UIController : MonoBehaviour | |
{ | |
[SerializeField] | |
private Text questionText; | |
[SerializeField] | |
private Button[] answerButtons; |