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; | |
public class EnumFlagAttribute : PropertyAttribute | |
{ | |
public string enumName; | |
public EnumFlagAttribute() {} | |
public EnumFlagAttribute(string name) | |
{ |
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
GameObject {prefabName} = AssetDatabase.LoadAssetAtPath<GameObject> ("Assets/{path}/{name}.prefab"); | |
GameObject {name} = PrefabUtility.InstantiatePrefab ({prefabName}) as GameObject; |
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 UnityEngine.UI; | |
using System.Collections; | |
public class ShadowBG : MonoBehaviour | |
{ | |
protected Image image; | |
public float fadeTime = 2.0f; | |
protected float currentTime = 0.0f; |
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 UnityEditor; | |
using System.Collections; | |
[CustomEditor (typeof(UIInspect))] | |
public class UIInspectEditor : Editor | |
{ | |
public override void OnInspectorGUI () | |
{ |
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; | |
[ExecuteInEditMode] | |
public class FaceCamera : MonoBehaviour | |
{ | |
public bool faceCameraActive = true; | |
public Camera targetCamera; |
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
struct WorkoutActivityType { | |
let raw:UInt | |
let name:String | |
let deprecated:Bool | |
} | |
let workoutTypes:[UInt:WorkoutActivityType] = [1: WorkoutActivityType(raw:1, name: "American Football", deprecated: false), | |
2: WorkoutActivityType(raw:2, name: "Archery", deprecated: false), | |
3: WorkoutActivityType(raw:3, name: "Australian Football", deprecated: false), | |
4: WorkoutActivityType(raw:4, name: "Badminton", deprecated: false), |