(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| using Unity.Mathematics; | |
| using Unity.Rendering; | |
| using UnityEngine; | |
| namespace Realms | |
| { | |
| /// <summary> | |
| /// Based on Unity.Rendering.FrustumPlanes since those aren't public for some reason. | |
| /// </summary> | |
| public struct FrustumPlanes |
| public class DeclensionGenerator | |
| { | |
| /// <summary> | |
| /// Возвращает слова в падеже, зависимом от заданного числа | |
| /// </summary> | |
| /// <param name="number">Число от которого зависит выбранное слово</param> | |
| /// <param name="nominativ">Именительный падеж слова. Например "день"</param> | |
| /// <param name="genetiv">Родительный падеж слова. Например "дня"</param> | |
| /// <param name="plural">Множественное число слова. Например "дней"</param> | |
| /// <returns></returns> |
| /* | |
| Basic Sprite Shader for aligning pixel art to the same grid, based on the Unity Sprite Shader. | |
| Create one Material where you assign the same Pixels Per Unit value you use on your imported Sprites, | |
| then reuse this Material on all appropriate Sprite Renderers. | |
| (You can use Shader.SetGlobalFloat to set that Pixels Per Unit value for all your shaders: | |
| https://docs.unity3d.com/ScriptReference/Shader.SetGlobalFloat.html) | |
| This is not for scaled or rotated artwork. If you need those features, look at low res render textures. | |
| Use this however you want. |
| using UnityEngine; | |
| using UnityEditor; | |
| using System; | |
| using System.Collections; | |
| [CustomPreview(typeof(YourCustomScriptableObject))] // THIS IS VERY IMPORTANT, this is so the editor knows what this is supposed to be previewing at all | |
| public class SkinnedMeshObjectPreviewExample : ObjectPreview { | |
| PreviewRenderUtility m_PreviewUtility; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #OS junk files | |
| [Tt]humbs.db | |
| *.DS_Store | |
| #Visual Studio files | |
| *.[Oo]bj | |
| *.user | |
| *.aps | |
| *.pch | |
| *.vspscc |
| #region Constructor and Singleton | |
| private static readonly Singleton _instance = new Singleton(); | |
| public static Singleton Instance | |
| { | |
| get { return _instance; } | |
| } | |
| private Singleton() |