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; | |
| /// <summary> | |
| /// Responsive Camera Scaler | |
| /// </summary> | |
| public class CameraAspectRatioScaler : MonoBehaviour { | |
| /// <summary> | |
| /// Reference Resolution like 1920x1080 | |
| /// </summary> |
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
| /* | |
| * Internationalization | |
| * | |
| * Author: Daniel Erdmann | |
| * | |
| * 1. Add this File to you Project | |
| * | |
| * 2. Add the language files to the folder Assets/Resources/I18n. (Filesnames: en.txt, es.txt, pt.txt, de.txt, and so on) | |
| * Format: en.txt: es.txt: | |
| * =============== ================= |
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
| /* | |
| * Detects clicks on game objects | |
| * | |
| * 1. Attach ClickDetector component to a camera or a "game manager" object | |
| * 2. Attach a collider (e.g. BoxCollider) to all objects that should receive a on click event | |
| * 3. Attach a MonoBehaviour to all objects that should receive a on click event registering to the event. | |
| * | |
| * The MonoBehavior should have at least: | |
| * | |
| * public class ClickableGameObject : MonoBehaviour, ClickDetector.ClickDetectorListener |
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
| /* | |
| * Rotates an object towards the currently active camera | |
| * | |
| * 1. Attach CameraBillboard component to a canvas or a game object | |
| * 2. Specify the offset and you're done | |
| * | |
| **/ | |
| using UnityEngine; |
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.IO; | |
| public class FileManager | |
| { | |
| /// <summary> | |
| /// Load File | |
| /// </summary> | |
| /// <typeparam name="T">Data Model Type</typeparam> | |
| /// <param name="filename">File Name</param> |
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; | |
| /* | |
| * Moving Platform | |
| * | |
| * 1. Attach WayPointPath to an empty game object | |
| * 2. Create empty game object children (these will be handled as waypoints) | |
| * 3. Attach Platform component to a game object and assign the WayPointPath | |
| * | |
| * | |
| **/ |
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.IO; | |
| using UnityEngine; | |
| public class Paintable : MonoBehaviour { | |
| public GameObject Brush; | |
| public float BrushSize = 0.1f; | |
| public RenderTexture RTexture; |
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; | |
| public class HappyCube : MonoBehaviour { | |
| MeshFilter mFilter; | |
| Mesh Mesh; | |
| public float UpDownFactor = 0.1f; | |
| public float UpDownSpeed = 6f; | |
| public float LeftFactor = 0.3f; |
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; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Profiling; | |
| public class KdTree<T> : IEnumerable<T>, IEnumerable where T : Component | |
| { | |
| protected KdNode _root; | |
| protected KdNode _last; |
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; | |
| public class TouchToShoot : MonoBehaviour { | |
| public Material hitMaterial; | |
| // Use this for initialization | |
| void Start () { | |
| } |
NewerOlder