// src*: https://gist.github.com/andrew-raphael-lukasik/d2903247b3f9c94e6faa9c042d9f0460/
#if UNITY_EDITOR
[UnityEditor.MenuItem( "Tools/Fix All Terrain Seams" )]
static void FixAllSeams () { FixTerrains( Object.FindObjectsOfType<Terrain>() ); }
#endif
static void FixTerrains ( Terrain[] terrains )
🏴☠️
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
//SOURCE: https://gist.github.com/andrew-raphael-lukasik/36a30f0955d7cdc758e394dc4e7266bf | |
using System.Collections; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.Build; | |
public class IncreaseBuildNumberAutomatically : IPreprocessBuild |
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
//SOURCE: https://gist.github.com/andrew-raphael-lukasik/60e6dc072dc170ab535a7aff961c3ba9 | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
//TODO: Add build-time warnings |
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
//Usage example: | |
//yield return Wait.t2s5;//waits 2.5 seconds | |
using UnityEngine; | |
public class Wait | |
{ | |
public readonly static object frame = null; | |
public readonly static WaitForEndOfFrame endOfFrame = new WaitForEndOfFrame(); | |
public readonly static WaitForFixedUpdate fixedUpdate = new WaitForFixedUpdate(); |
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.IO; | |
namespace SevenZip.Compression.LZMA | |
{ | |
public static class SevenZipHelper | |
{ | |
static int dictionary = 1 << 23; |
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 Unity.Collections; | |
using Unity.Mathematics; | |
public class DynamicMeshData : System.IDisposable | |
{ | |
#region FIELDS & PROPERTIES |
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 CoroutineController : MonoBehaviour | |
{ | |
static CoroutineController _singleton; | |
static Dictionary<string,IEnumerator> _routines = new Dictionary<string,IEnumerator>(100); | |
[RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.BeforeSceneLoad )] |
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
int2[] ToEdges ( int[] triangles ) | |
{ | |
var edges = new Dictionary<ulong,int2>(); | |
for( int i=0 ; i<triangles.Length ; i+=3 ) | |
{ | |
int a = triangles[i]; | |
int b = triangles[i+1]; | |
int c = triangles[i+2]; | |
ulong hash; | |
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
// void* src = https://gist.github.com/andrew-raphael-lukasik/e4ae9b45a2c24672c0d1218f77235948 | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
using UnityEngine.Localization; | |
using UnityEngine.Localization.Settings; | |
using UnityEngine.ResourceManagement.AsyncOperations; |
OlderNewer