Skip to content

Instantly share code, notes, and snippets.

View andreiagmu's full-sized avatar
🎮
Developing NekoSuki! ~ Kitty Love Adventure 🐈❤️

Andrei Müller (Andy Miira) andreiagmu

🎮
Developing NekoSuki! ~ Kitty Love Adventure 🐈❤️
View GitHub Profile
@snlehton
snlehton / ResoScaler.cs
Created October 16, 2016 18:57
A simple Unity component to render the screen in lower resolution
using UnityEngine;
// Render the screen in lower resolution
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
public class ResoScaler : MonoBehaviour
{
[Range(1, 8)]
public float scale = 1;
@karl-
karl- / CleanUpWindow.cs
Created November 15, 2012 03:25
New interface for removing unused Unity assets
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class CleanUpWindow : EditorWindow
{
bool groupEnabled = true;
List<string> usedAssets = new List<string>();
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
public static class PivotUtilities
{
[MenuItem("GameObject/Pivot/Create Pivot", false, 0)]
static void CreatePivotObject()
{
@nonathaj
nonathaj / CatchEvent
Last active September 8, 2023 22:30
Unity Event System for Designers
using UnityEngine;
using UnityEngine.Events;
using System.Collections;
/*
Event class for catching Unity Message Events that are sent to the GameObject's attached components.
Events that are captured here are sent from the GameObjectHelper class
*/
[AddComponentMenu("Event/Catch Event")]
@MeowKim
MeowKim / addressable_asset.md
Last active September 11, 2023 19:32
Guide for Unity Addressable Asset System.

📝 About

Guide for Unity Addressable Asset System.
Check out this sample code repo.

This guide supports languages below.

Created: 2020-07-03
Last updated: 2020-08-26 minor typo correction

@nikomoravec
nikomoravec / Program.cs
Created February 6, 2018 16:24
Call private methods in C#
using System;
using System.Reflection;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
A a = new A();
@waldobronchart
waldobronchart / UnityPlatformSwitcher.cs
Last active October 12, 2023 09:13
A simple fast platform switcher for Unity
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public class PlatformSwitcher
{
[MenuItem("Platform/PC, Mac and Linux Standalone")]
static void SwitchPlatformToDesktop()
{
@p2or
p2or / blender-merge-vertex-groups.py
Last active October 24, 2023 14:50
Merge Vertex Groups #Blender
import bpy
group_input = {"Group", "Group.001", "Group.002"}
ob = bpy.context.active_object
group_lookup = {g.index: g.name for g in ob.vertex_groups}
group_candidates = {n for n in group_lookup.values() if n in group_input}
# test whether all candidates components of group_lookup
if all(n in group_lookup.values() for n in group_candidates):
@jeffvella
jeffvella / AddressablesLoader.cs
Last active December 11, 2023 12:26
AddressablesLoader
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.ResourceManagement.ResourceLocations;
using Object = UnityEngine.Object;
public class AddressableLabels
@adekbadek
adekbadek / showedgecollider.cs
Last active December 30, 2023 19:02
Show 2D Edge Collider as Gizmo, also in Edit Mode
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class visibleCollider : MonoBehaviour {
// The Collider itself
private EdgeCollider2D thisCollider;
// array of collider points
private Vector2[] points;