Skip to content

Instantly share code, notes, and snippets.

@olegmrzv
olegmrzv / PlayerLoopCleaner.cs
Created April 4, 2024 13:07
PlayerLoop Disable Unity Modules
using System;
using UnityEngine;
using UnityEngine.LowLevel;
using UnityEngine.PlayerLoop;
public static class PlayerLoopCleaner
{
private static readonly Type[] typesToRemove = new Type[] {
typeof(EarlyUpdate.Physics2DEarlyUpdate),
// Physics 2D
@LizzyFox-code
LizzyFox-code / ContentScaler.cs
Last active April 5, 2024 13:11
Content scaler for Unity Noesis GUI
#if UNITY_5_3_OR_NEWER
#define NOESIS
using Noesis;
#else
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
#endif
namespace NoesisGUI.Extensions.Scaling
@antonsmetanin
antonsmetanin / tasks.md
Created November 18, 2021 14:10
Создание тасков

В общем для создания тасков обычно используется следующие способы, в порядке от самых часто используемых к самым редко используемым:

  1. Через ключевое слово async. Это для случая, когда у нас уже имеются какие-то таски или эвэйтеры и мы их просто await'им в методе. То есть, когда мы помечаем метод словом async, это превращает его в объект (или структуру) со стейт машиной внутри. Используется везде.

    Пример:

    Task<bool> DoFirstAsync() { ... }
    Task<bool> DoSecondAsync() { ... }
@andreiagmu
andreiagmu / FastPlatformSwitcherSymlink_Windows.cs
Last active June 19, 2024 07:26
Improved FastPlatformSwitcher for Unity 2018 (and maybe other Unity versions), for Asset Database v1 - Symlink version (for Windows systems)
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
public class AnimatedUnitCompressor : EditorWindow {
Vector2 scrollPos = Vector2.zero;
public List<GameObject> UnitPrefabs;
public static string BonePrefix;
private SerializedObject _serializedObject;
@Guendeli
Guendeli / AwesomeUtils.cs
Last active April 14, 2024 21:38
Cool Utility class extending various Unity3D functions in: Screenshots, Mathf, Animator, PlayerPrefs, Color etc..
using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
/*
* AWESOME UTILS TO SAVE YOUR DAY
* These codes were aggregated from personnal codebase as well
* as some Stack / Unity threads