Skip to content

Instantly share code, notes, and snippets.

🎮
Learning Unity

Dmitrij Duhnich dimmduh

🎮
Learning Unity
Block or report user

Report or block dimmduh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dimmduh
dimmduh / MyStandaloneInputModule.cs
Last active Jun 17, 2019
Test virutal cursor for unity (2019.1)
View MyStandaloneInputModule.cs
using UnityEngine;
using UnityEngine.EventSystems;
public class MyStandaloneInputModule : StandaloneInputModule
{
public RectTransform m_VirtualCursor;
private Vector2 m_LastMousePosition;
private Vector2 m_MousePosition;
@dimmduh
dimmduh / EditorHelperHotkeys.cs
Last active Jun 5, 2019
Put somewhere in Editor folder
View EditorHelperHotkeys.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
//version 0.2
@dimmduh
dimmduh / LayoutHotKey.cs
Created May 31, 2019
Unity reset layout by hotkey (default Ctrl + Shift + R). Put script to any Editor folder.
View LayoutHotKey.cs
using System;
using System.IO;
using System.Reflection;
using UnityEditor;
public static class LayoutHotKey
{
const string layoutName = "Temp/autosave.wlt";
// % (ctrl), # (shift), & (alt)
View NavMeshMerge.cs
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class NavMeshMerge : MonoBehaviour
{
public NavMeshMerge Instance;
public MeshFilter meshFilter;
@dimmduh
dimmduh / RotationHelper.cs
Created Feb 20, 2019
Unity - Rotate around point tool - test 1
View RotationHelper.cs
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public class RotationHelper
{
private static bool enabled;
View gist:c797a2ade6cda77279f726efa2c17206
/**
* @translate
*/
private static $countries = [
'AE' => 'United Arab Emirates',
'AR' => 'Argentina',
'AT' => 'Austria',
'AU' => 'Australia',
'BE' => 'Belgium',
View ExportLocalization.cs
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
public class ExportLocalization : MonoBehaviour {
[MenuItem("IO Games/Localization/Export")]
@dimmduh
dimmduh / IOEditorUtils.cs
Last active Dec 21, 2018
To any Editor folder - Ctrl + Shift + X - cut/paste ; Ctrl + G - no parent
View IOEditorUtils.cs
using System;
using UnityEditor;
using UnityEngine;
namespace IOGames.Utils
{
public class IOEditorUtils
{
[MenuItem("IO Games/Удалить Player Prefs", false, -1)]
public static void DeletePlayerPrefs()
@dimmduh
dimmduh / MyUtils.cs
Created Sep 24, 2018
Unity - reset all static properties
View MyUtils.cs
public class MyUtils
{
public static void ResetAllStaticsVariables(Type type)
{
var fields = type.GetFields(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy | BindingFlags.Public);
foreach (var fieldInfo in fields)
{
fieldInfo.SetValue(null, GetDefault(type));
}
}
View gist:e92c7235339a96e0df24786a99984e82
Ctrl + N
Ctrl + O
Ctrl + S
Ctrl + Shift + S
Ctrl + Shift + B
Ctrl + Z
ctrl + A - выделить всё
Delete - удалить
You can’t perform that action at this time.