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; | |
// Moves Camera similar to how camera is moved in the Unity view port. Drop the scrip on the game object which has the camera and you wish to move. | |
public class SmoothGameCameraMovement : MonoBehaviour | |
{ | |
public float lateralSpeed = 0.0015f; |
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; | |
namespace awesomeCompanyName.awesomeProductName.relevantNaming | |
{ | |
public class MyComponent : MonoBehaviour | |
{ | |
private OtherComponent _usedOnlyByMe; | |
[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
Shader "ARCore/DiffuseColorWithLightEstimation" | |
{ | |
Properties | |
{ | |
_Color("Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
SubShader | |
{ |
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 System.Collections; | |
// This is not need but I just wanted to make the point clear. | |
public class AnimatedComponent : MonoBehaviour | |
{ | |
} |
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 System.Collections; | |
using System.Reflection; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using UnityEditor; | |
using UnityEngine; | |
using System.Security; |
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 System.Collections; | |
public class movement : MonoBehaviour { | |
const int numSamples = 10; | |
public GameObject head; | |
public float scalingFactor; | |
private Vector3 headPrev; |
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 System.Collections; | |
using System.Collections.Generic; | |
public static class ListExtensions | |
{ | |
public static T PickRandom<T>(this IList<T> source) | |
{ | |
if (source.Count == 0) | |
return default(T); |
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 System.Collections; | |
using UnityEngine.UI; | |
using System.IO; | |
public class SubmitFormOnline : MonoBehaviour { | |
public InputField textReference; | |
public string pendingDir; | |
// FormID comes from the google drive ID, eg: |
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; | |
using System.Collections; | |
using System.IO; | |
public class SaveFormToDisk : MonoBehaviour { | |
public InputField textReference; | |
public string saveDir; | |
public void SaveToFile(string text, string subDir) { |
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 System.Collections; | |
public class LinkedCamera : MonoBehaviour { | |
// What transform to chase: | |
public Transform target; | |
// Debug keyboard controls: | |
public KeyCode modifier; | |
public KeyCode incSmooth; |
NewerOlder