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.Reflection; | |
namespace UnityEditor { | |
public static class Ext_SerializedProperty { | |
const BindingFlags FLAGS_ALL = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy; | |
/// <summary> |
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.SceneManagement; | |
/// <summary> | |
/// Data wrapper that automatically resets to default value on scene load. | |
/// Make a static instance for safer per-scene static access to data. | |
/// </summary> | |
public class SafeStatic<T> { | |
public T value; | |
public T defaultValue; |
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 UnityEngine.Networking; | |
public class NetworkTransformLerp : NetworkBehaviour { | |
public Transform target; | |
Vector3 _lastPos, _nextPos; | |
Quaternion _lastRot, _nextRot; |
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 UnityEditor; | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class ImportFlatShadedMesh : AssetPostprocessor { | |
void OnPostprocessModel(GameObject g){ | |
Mesh m = g.GetComponentInChildren<MeshFilter>().sharedMesh; | |
Vector3[] oldVertices = m.vertices; |
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; | |
public class CursorManager : MonoBehaviour { | |
#region Static | |
#region Singleton | |
/* Class is a MonoBehaviour to recieve OnApplicationFocus(bool) message | |
* If no instance already present, one will be created BEFORE scene load | |
* CursorManager placed in scene will override auto-created instance | |
* Any created instance will call DontDestroyOnLoad on itself, but still gets overridden by scene |