Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
public class IncreaseScoreOverTime : MonoBehaviour
{
//The text component that the score will be displayed on.
[SerializeField]
private Text _scoreText;
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour {
private bool _isShaking = false;
[SerializeField]private float _shakeDuration = 0.25f;
[SerializeField]private float _originalXPos = 0f;
[SerializeField]private float _originalYPos = 0f;
using System;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Repository of commonly used prefabs.
/// </summary>
[AddComponentMenu("Gameplay/ObjectPool")]
public class ObjectPool : MonoBehaviour
using System.Collections;
using UnityEngine;
using DG.Tweening;
namespace Audio
{
public class SFXManager : MonoBehaviour
{
//Instance of this script.
private static SFXManager s_Instance = null;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ImageAnimation : MonoBehaviour
{
[SerializeField]
private Image _animatedImage;
using System;
using System.IO;
using UnityEngine;
using System.Runtime.Serialization.Formatters.Binary;
namespace Serialization
{
public class Serializer
{
public static void Save<T>(string filename, T data) where T : class
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ColorLerp : MonoBehaviour
{
[SerializeField]
private Image _imageToLerp;
/*
#SCRIPTNAME#.cs
Created #CREATIONDATE#
Project #PROJECTNAME# by #DEVELOPERS#
*/
using UnityEngine;
namespace #NAMESPACE#
{
public class #SCRIPTNAME# : MonoBehaviour
using UnityEngine;
using UnityEditor;
public class KeywordReplace : UnityEditor.AssetModificationProcessor
{
public static void OnWillCreateAsset(string path)
{
path = path.Replace(".meta", "");
int index = path.LastIndexOf(".");
string file;
using System.Collections.Generic;
using UnityEngine;
public static class ExtensionMethods
{
#region List
public static void ShuffleList<T>(this List<T> list)
{
List<T> tempList = list;
for (int i = 0; i < tempList.Count; i++)