Skip to content

Instantly share code, notes, and snippets.

View dimmduh's full-sized avatar
🎮
Learning Unity

Dmitrii Dukhnich dimmduh

🎮
Learning Unity
View GitHub Profile
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active November 16, 2024 18:02
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@anarkila
anarkila / PerformanceMetrics.cs
Last active May 16, 2024 07:29
Expose Unity Profiler stats with Unity ProfilerRecorder API
// MIT License
// Copyright (c) 2022 anarkila - https://github.com/anarkila
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@maca134
maca134 / WorkshopUploader.bat
Created April 20, 2021 15:46
Workshop Uploader
@ECHO off
SETLOCAL enableextensions enabledelayedexpansion
CD /D "%~dp0"
SET BASEPATH=%~dp0
REM =============================[CONFIG START]=============================
SET STEAMCMDPATH=.steamcmd
REM Steam login details, you may need to run this twice if you have Auth Guard enabled (which you should)
#if UNITY_EDITOR
using System;
using System.Linq;
using OdinExtensions;
using Sirenix.OdinInspector.Editor;
using Sirenix.OdinInspector.Editor.Validation;
using Sirenix.Serialization;
using UnityEngine;
using Object = UnityEngine.Object;
@Nesh108
Nesh108 / DiscordLogger.cs
Last active September 13, 2024 20:47
Unity Logger for posting Errors to Discord channel
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;
// License: MIT
// Created by: Aceria_
// Edited by: Nesh108
// To use, add these to any MonoBehaviour:
// OnEnable: `Application.logMessageReceived += DiscordLogger.HandleLog;`
@kraj0t
kraj0t / RebasePrefab.cs
Last active November 1, 2022 02:50
RebasePrefab - Unity editor tool to convert a prefab into a variant of a new empty prefab
/*
* @brief Editor menu item for turning a prefab into a variant of a new empty prefab.
*
* @usage Access from the MenuItem defined in the code. As right-click or from the menu bar.
*
* @author Aurelio Provedo
* Contact: [email protected]
*
*/
@edwardrowe
edwardrowe / BuildToolExample.cs
Last active March 22, 2021 16:12
An example of a Build Tool, used to accompany my blog post on Versioning with git in Unity.
/* MIT License
Copyright (c) 2016 RedBlueGames
*/
using UnityEditor;
using UnityEngine;
using UnityEditor.Build.Reporting;
public class BuildToolExample : MonoBehaviour
{
@phosphoer
phosphoer / ControllerIconMapDefinition.cs
Last active June 10, 2024 23:20
Rewired Glyph Mappings
using UnityEngine;
using System.Collections.Generic;
[CreateAssetMenu(fileName = "new-controller-icon-mapping", menuName = "Controller Icon Mapping")]
public class ControllerIconMapDefinition : ScriptableObject
{
[SerializeField]
private InputIconMapDefinition gamepadMap = null;
[SerializeField]
using System.Collections;
using UnityEngine;
public class MacosKeychain
{
public static string GetKeychainPassword(string accountName,string serviceName)
{
var value = ShellHelper.Bash($"security find-generic-password -a {accountName} -s {serviceName} -w -g");
return value.TrimEnd( '\r', '\n' );
@vildninja
vildninja / RemoveMissingScriptsRecursively.cs
Created March 25, 2019 10:06
Remove missing MonoBehaviour script components in Unity 2019.1 including visiting prefafab assets.
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEditor;
public static class FindMissingScriptsRecursively
{
[MenuItem("Auto/Remove Missing Scripts Recursively Visit Prefabs")]
private static void FindAndRemoveMissingInSelected()
{
// EditorUtility.CollectDeepHierarchy does not include inactive children