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
/**
* @translate
*/
private static $countries = [
'AE' => 'United Arab Emirates',
'AR' => 'Argentina',
'AT' => 'Austria',
'AU' => 'Australia',
'BE' => 'Belgium',
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 December 21, 2018 05:51
To any Editor folder - Ctrl + Shift + X - cut/paste ; Ctrl + G - no parent
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 September 24, 2018 09:16
Unity - reset all static properties
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));
}
}
Ctrl + N
Ctrl + O
Ctrl + S
Ctrl + Shift + S
Ctrl + Shift + B
Ctrl + Z
ctrl + A - выделить всё
Delete - удалить
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using com.ootii.Messages;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.UI;
(0,0): Unity.Compiler.Client.InvokeCompiler Exception:System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: There is an error in XML document (1457, 57). ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1457, position 57.
at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <7fd195060d8c41448694ab221d3b56ca>:0
at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String[] args) [0x00029] in <7fd195060d8c41448694ab221d3b56ca>:0
at System.Xml.XmlTextReaderImpl.Throw (System.Int32 pos, System.String res, System.String[] args) [0x0000c] in <7fd195060d8c41448694ab221d3b56ca>:0
at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline (System.Int32 startPos, System.Boolean expand, System.Text.StringBuilder internalSubsetBuilder, System.Int32& charCount, System.Xml.XmlTextReaderImpl+EntityType& entityType) [0x00189] in <7fd195060d8c41448694ab221d3b56ca>:0
at System.Xml.XmlTextReaderImpl.ParseC
Unity Editor by Unity Technologies [version: Unity 2018.2.0f2_787658998520]
Unity.exe caused an Access Violation (0xc0000005)
in module Unity.exe at 0033:42aeda57.
Error occurred at 2018-07-30_112844.
C:\Program Files\2018.2.0f2\Editor\Unity.exe, run by User.
92% physical memory in use.
32705 MB physical memory [2495 MB free].
This file has been truncated, but you can view the full file.
LICENSE SYSTEM [2018729 14:25:19] Next license update check is after 2018-06-08T08:14:16
Built from '2018.2/staging' branch; Version is '2018.2.0f2 (787658998520) revision 7894616'; Using compiler version '191225831'
OS: 'Windows 7 (6.1.0) 64bit' Language: 'ru' Physical Memory: 32704 MB
BatchMode: 0, IsHumanControllingUs: 1, StartBugReporterOnCrash: 1, Is64bit: 1, IsPro: 0
[Package Manager] Server::Start -- Port 31154 was selected
ListPackages failed, output: {
"name": "unity-editor",
"version": "5.7.0",
@dimmduh
dimmduh / mainTemplate.gradle
Last active June 15, 2018 06:50
Unity gradle custom template with multidex
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}