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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using UnityEngine; | |
using UnityEngine.Serialization; | |
/*To use this script, when you need to get a variable from another script/component, instead of directly | |
referencing the component and then the specific variable (e.g. rBody.velocity), you would make a "ComponentVariable" |
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; | |
public class TextureFlip | |
{ | |
public static Texture2D FlipTexture(this Texture2D original) | |
{ | |
int textureWidth = original.width; | |
int textureHeight = original.height; |
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; | |
[ExecuteInEditMode()] | |
public class NumberiseChildrenUtility : MonoBehaviour | |
{ | |
//Use https://gist.github.com/adamski11/bd61693a1f90130c536d080496012ed9 to use a button in the inspector | |
//[TestButton("Numberise Children", "NumberiseChildren")] | |
[Header("Click to Run")] |
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; | |
[RequireComponent(typeof(Image))] | |
[ExecuteInEditMode] | |
public class FillBarGradientScript : MonoBehaviour | |
{ | |
public Gradient gradient; | |
Image fillImage; |