This file contains hidden or 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
| 一 | |
| 乙 | |
| 二 | |
| 十 | |
| 丁 | |
| 厂 | |
| 七 | |
| 卜 | |
| 八 | |
| 人 |
This file contains hidden or 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.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using Debug = UnityEngine.Debug; | |
| using Object = UnityEngine.Object; | |
| namespace FoundationEditor.Editor.ReferenceFinder | |
| { |
This file contains hidden or 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.Reflection; | |
| public class TerriblyHackyLog : MonoBehaviour | |
| { | |
| void Start () | |
| { | |
| Log ("Aaaaarrrrgh!"); | |
| } |
This file contains hidden or 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
| // perspective camera, get far clip plane edges in world space (z is set to 0) | |
| var bottomLeft = (Vector2)cam.ScreenToWorldPoint(new Vector3(0, 0, cam.farClipPlane)); | |
| var topLeft = (Vector2)cam.ScreenToWorldPoint(new Vector3(0, cam.pixelHeight, cam.farClipPlane)); | |
| var topRight = (Vector2)cam.ScreenToWorldPoint(new Vector3(cam.pixelWidth, cam.pixelHeight, cam.farClipPlane)); | |
| var bottomRight = (Vector2)cam.ScreenToWorldPoint(new Vector3(cam.pixelWidth, 0, cam.farClipPlane)); | |
| Debug.DrawLine(bottomLeft, topLeft, Color.red, 33); | |
| Debug.DrawLine(topLeft, topRight, Color.green, 33); | |
| Debug.DrawLine(topRight, bottomRight, Color.blue, 33); | |
| Debug.DrawLine(bottomRight, bottomLeft, Color.magenta, 33); |
This file contains hidden or 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.UI; | |
| // @kurtdekker - to help fitting portrait / landscape UI stuff together | |
| // | |
| // Put this where the CanvasScaler is. | |
| // | |
| // You should set CanvasScaler to: |
This file contains hidden or 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; | |
| // For a discussion of the code, see: https://www.hallgrimgames.com/blog/2018/11/25/custom-unity-ui-meshes | |
| public class MyUiElement : MaskableGraphic | |
| { | |
| public float GridCellSize = 40f; | |
| [SerializeField] |
This file contains hidden or 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; | |
| // by @kurtdekker - to make a Unity singleton that has some | |
| // prefab-stored, data associated with it, eg a music manager | |
| // | |
| // To use: access with SingletonViaPrefab.Instance | |
| // | |
| // To set up: |
This file contains hidden or 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; | |
| // by @kurtdekker - to make a simple Unity singleton that has no | |
| // predefined data associated with it, eg, a high score manager. | |
| // | |
| // To use: access with SingletonSimple.Instance | |
| // | |
| // To set up: |
This file contains hidden or 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 CameraShake : MonoBehaviour | |
| { | |
| // Transform of the camera to shake. Grabs the gameObject's transform | |
| // if null. | |
| public Transform camTransform; | |
| // How long the object should shake for. |
This file contains hidden or 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
| /// | |
| /// Simple pooling for Unity. | |
| /// Author: Martin "quill18" Glaude ([email protected]) | |
| /// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
| /// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
| /// UPDATES: | |
| /// 2015-04-16: Changed Pool to use a Stack generic. | |
| /// | |
| /// Usage: | |
| /// |
NewerOlder