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
/** | |
* VolumeUtils.cs | |
* Author: Luke Holland (http://lukeholland.me/) | |
*/ | |
using UnityEngine; | |
public static class VolumeUtils | |
{ |
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
/** | |
* Singleton.cs | |
* Author: Luke Holland (http://lukeholland.me/) | |
*/ | |
using UnityEngine; | |
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour | |
{ |
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
public static float TriangleWave(float x) | |
{ | |
return UnityEngine.Mathf.Abs((x%4)-2)-1; | |
} |
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
/** | |
* DownloadHandlerFile.cs | |
* Author: Luke Holland (http://lukeholland.me/) | |
*/ | |
using UnityEngine; | |
using UnityEngine.Networking; | |
using System.IO; | |
public class DownloadHandlerFile : DownloadHandlerScript |
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
/** | |
* TreeNode.cs | |
* Author: Luke Holland (http://lukeholland.me/) | |
*/ | |
using System; | |
using System.Collections.Generic; | |
public class TreeNode<T> | |
{ |
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; | |
// Example usage: | |
// [UID] public string id; | |
public class UIDAttribute : PropertyAttribute | |
{ | |
} |
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 UnityEditor.Callbacks; | |
public class AutoIncrementBuildNumber | |
{ | |
[PostProcessBuild] | |
public static void OnBuildComplete(BuildTarget buildTarget, string pathToBuiltProject) | |
{ | |
if (buildTarget==BuildTarget.iOS) { | |
PlayerSettings.iOS.buildNumber = (int.Parse (PlayerSettings.iOS.buildNumber) + 1).ToString(); |
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
/** | |
* UISafeArea.cs | |
* Author: Luke Holland (http://lukeholland.me/) | |
*/ | |
namespace UnityEngine.UI | |
{ | |
[RequireComponent(typeof(RectTransform))] | |
public class UISafeArea : MonoBehaviour |
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.AddressableAssets; | |
using UnityEngine.AddressableAssets.ResourceLocators; | |
using UnityEngine.ResourceManagement; | |
using UnityEngine.ResourceManagement.ResourceLocations; | |
using UnityEngine.ResourceManagement.ResourceProviders; | |
using UnityEngine.ResourceManagement.AsyncOperations; | |
using UnityEngine.SceneManagement; | |
using System.Collections; | |
using System.Collections.Generic; |