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.Runtime.InteropServices; | |
using UnityEngine; | |
public class MonoTricks : MonoBehaviour { | |
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] | |
static extern IntPtr mono_unity_liveness_calculation_from_statics_managed(IntPtr typeHandle); | |
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] |
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
// 2.0(3.5) default at path %UNITY%\Editor\Data\Mono\lib\mono\2.0 | |
public static TSource[] ToArray<TSource>(this IEnumerable<TSource> source) | |
{ | |
Check.Source(source); | |
ICollection<TSource> collection = source as ICollection<TSource>; | |
if (collection != null) | |
{ | |
TSource[] array = new TSource[collection.Count]; | |
collection.CopyTo(array, 0); | |
return array; |
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
### Unity ### | |
/[Ll]ibrary/ | |
/[Tt]emp/ | |
/[Oo]bj/ | |
/[Bb]uild/ | |
/[Bb]uilds/ | |
/[Ll]ogs/ | |
/[Ll]og/ | |
/[Aa]ssets/AssetStoreTools* | |
/[Aa]ssetBundles/ |
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
#if UNITY_EDITOR | |
using System; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
public static class FixGameViewScale { | |
private const string PREFS_KEY = "FIX_GAMEVIEW_SCALES"; | |
private const BindingFlags BINDING_FLAGS = BindingFlags.Instance | BindingFlags.NonPublic; |
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
alias git-clean="git branch | grep -v '*' | grep -v 'develop' | xargs git branch -D && git reset --hard" |
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
# Git LFS tracking file types | |
# IronSource | |
*.a filter=lfs diff=lfs merge=lfs -text | |
IS*Adapter filter=lfs diff=lfs merge=lfs -text | |
GoogleMobileAds filter=lfs diff=lfs merge=lfs -text | |
# Image | |
*.jpg filter=lfs diff=lfs merge=lfs -text | |
*.jpeg filter=lfs diff=lfs merge=lfs -text |
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.Runtime.InteropServices; | |
public static class RenderDoc { | |
[StructLayout(LayoutKind.Sequential)] | |
struct RENDERDOC_API_1_0_0 { | |
public IntPtr GetAPIVersion; | |
public IntPtr SetCaptureOptionU32; | |
public IntPtr SetCaptureOptionF32; |
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
#pragma kernel CSParticle | |
// Particle's data | |
struct Particle | |
{ | |
float3 position; | |
float3 velocity; | |
float life; | |
}; |
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
//https://forum.unity.com/threads/package-manager-showing-hidden-packages-script.995506/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEditor.PackageManager.UI; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
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.Collections; | |
using System.Collections.Generic; | |
// public class Program { | |
// public static void Main() { | |
// foreach(var i in 1..5) { | |
// Console.WriteLine(i); | |
// } | |
// } |
OlderNewer