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
| //by kyle kukshtel | |
| //sample usage of DebugText.cs | |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| public static class DebugText | |
| { | |
| static float defaultXScale = .3f; | |
| static float defaultYScale = .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
| # Created by https://www.gitignore.io/api/osx,linux,unity,csharp,windows,monodevelop,visualstudio,visualstudiocode | |
| ### Csharp ### | |
| ## Ignore Visual Studio temporary files, build results, and | |
| ## files generated by popular Visual Studio add-ons. | |
| ## | |
| ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | |
| # User-specific files |
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
| public static class ShaderRenderState | |
| { | |
| public enum ZWrite //couldn't find any similar enum in UnityEngine.Rendering | |
| { | |
| Off = 0, | |
| On = 1 | |
| } | |
| public static void SetStencilRef(this Material mat, int value) { mat.SetInt("_StencilRef", value); } | |
| public static void SetStencilComp(this Material mat, UnityEngine.Rendering.CompareFunction value) { mat.SetInt("_StencilComp", (int)value); } |
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; | |
| [RequireComponent(typeof(Text))] | |
| public class AnimatedText: BaseMeshEffect | |
| { | |
| [SerializeField] private float _waitBetweenLetters = .1f; | |
| private CanvasRenderer _canvasRendered; |
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 UnityEngine; | |
| using UnityEngine.EventSystems; | |
| using UnityEngine.UI; | |
| [RequireComponent(typeof(ScrollRect))] | |
| [AddComponentMenu("UI/ScrollRect Auto-Scroll")] | |
| public class ScrollRectAutoScroll : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler | |
| { | |
| public float scrollSpeed = 10f; | |
| private bool mouseOver = false; |
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
| /* Copyright (c) 2017 Jacob Keane <http://jacobkeane.co.uk>. All rights reserved. | |
| This work is licensed under the terms of the MIT license. For a copy, see <https://opensource.org/licenses/MIT>. */ | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| /// <summary> | |
| /// A simple script to allow you to open a locked inspector for the currently selected object | |
| /// Right click on a GameObject in either the Hierarchy or Project view and select "Open Locked Inspector" | |
| /// Or press CTRL+I. |
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; | |
| // This is not need but I just wanted to make the point clear. | |
| public class AnimatedComponent : MonoBehaviour | |
| { | |
| } |
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 UnityEngine; | |
| /// <summary> | |
| /// Place the labels for the Triggers in this enum. | |
| /// Don't change the first label, NullTrigger as FSMSystem class uses it. | |
| /// </summary> | |
| public enum Trigger | |
| { | |
| NullTrigger = 0, // Use this trigger to represent a non-existing trigger in your system. |
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
| /* To avoid performance issues caused by string constructions when logging stuff | |
| * to the console, simply surround the code with the the following: | |
| * | |
| * #if DEBUG_LOGGING | |
| * Debug.Log("my" + numer.ToString("0.00") " super" + " expensive " + " string building code"); | |
| * #endif | |
| * | |
| * When creating a non-debug build or testing the game for performance, simply disable | |
| * the debug messages from the Unity menu (menu name can be simply changed below). | |
| */ |