Skip to content

Instantly share code, notes, and snippets.

View RimuruDev's full-sized avatar
🌅
Unity + Yandex Games

Rimuru RimuruDev

🌅
Unity + Yandex Games
View GitHub Profile
@RimuruDev
RimuruDev / PlayerLoopCleaner.cs
Created May 20, 2024 08:59 — forked from olegmrzv/PlayerLoopCleaner.cs
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
@RimuruDev
RimuruDev / psd2png.sh
Created May 19, 2024 07:28 — forked from rawaludin/psd2png.sh
Batch Convert PSD to PNG in Mac OS X
#!/bin/bash
for i in *psd
do
name=${i%.psd}
convert "$name.psd[0]" -resize 100% "$name.png"
done
@RimuruDev
RimuruDev / EditPrefab.cs
Created May 14, 2024 09:51 — forked from ulrikdamm/EditPrefab.cs
Unity editor script for better editing of prefabs. Put in Assets/Editor.
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser).
// This opens an empty scene with your prefab where you can edit it.
// Put this script in your project as Assets/Editor/EditPrefab.cs
public class EditPrefab {
static Object getPrefab(Object selection) {
@RimuruDev
RimuruDev / CustomInspectorCreator.cs
Created May 8, 2024 08:13 — forked from LotteMakesStuff/CustomInspectorCreator.cs
Editor extension that adds a tool to automagically generate boilerplate custom inspector code~ YES! Just drop it into a folder called 'Editor' and it adds a 'custom inspector' option into the Project window!
using UnityEngine;
using UnityEditor;
using System.IO;
public static class CustomInspectorCreator
{
[MenuItem("Assets/Create/Custom Inspector", priority = 81)]
static void CreateInsptorEditorClass()
{
foreach (var script in Selection.objects)
@RimuruDev
RimuruDev / Hierarhy2_Fixed_Version.text
Last active February 13, 2024 07:50
MissingReferenceException: The variable listIcons of HierarchyResources doesn't exist anymore. You probably need to reassign the listIcons variable of the 'HierarchyResources' script in the inspector. UnityEngine.Object.get_name () (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0) Hierarchy2.HierarchyResources+<>c.<GenerateKeyForAssets>b__2_0 (UnityEngi…
Error message:
MissingReferenceException: The variable listIcons of HierarchyResources doesn't exist anymore. You probably need to reassign the listIcons variable of the 'HierarchyResources' script in the inspector. UnityEngine.Object.get_name () (at <3b24cc7fa9794ed8ab04312c53e6dedd>:0) Hierarchy2.HierarchyResources+<>c.<GenerateKeyForAssets>b__2_0 (UnityEngine.Texture2D texture2D) (at Assets/Plugins/Hierarchy 2/Editor/HierarchyResources.cs:17) System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.List`1[T] source, System.Func`2[T,TResult] keySelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <dab7f68612224ba3ae40f651d44f9d4c>:0) System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <dab7f68612224ba3ae40f651d44f9d4c>:0) System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T]
// Copyright 2019 The Nakama Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@RimuruDev
RimuruDev / .gitignore
Last active December 27, 2023 17:01
Обновленный gitignore для видео https://www.youtube.com/watch?v=81hnAmuusGw Нужно скопировать содержимое файла ниже в ваш старый gitignore или заменить его. Убедитесь что формат вашего gitignore не .txt а .gitignore
# RimuruDev
# https://github.com/RimuruDev
**idea/
**.idea/
**.ws/
**.vs/
**/[Bb]uilds/
*/[Tt]rash/
*/[Tt]rash.meta
@RimuruDev
RimuruDev / TimeConstants.cs
Created November 17, 2023 12:17
TimeConstants for Unity
// **************************************************************** //
//
// Copyright (c) RimuruDev. All rights reserved.
// Contact me:
// - Gmail: rimuru.dev@gmail.com
// - GitHub: https://github.com/RimuruDev
// - LinkedIn: https://www.linkedin.com/in/rimuru/
// - GitHub Organizations: https://github.com/Rimuru-Dev
//
// **************************************************************** //
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>{{{ PRODUCT_NAME }}}</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
@RimuruDev
RimuruDev / UnityCustomScriptIconsBuildError.txt
Last active October 20, 2023 09:23
[SOLVED] I drew an icon for a script. To display the script with my icon in the Unity editor. But now the project doesn't build. How and where to fix it? Unity3D - Build Failed because of "[Unity] ERROR: An asset is marked with HideFlags.DontSave but is included in the build:"
An asset is marked with HideFlags.DontSave but is included in the build:
Asset: 'Assets/External/Resources/ScriptIcons/DontDestroyOnLoadIcon.jpg'
Asset name: DontDestroyOnLoadIcon
(You are probably referencing internal Unity data in your build.)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Assertion failed on expression: 'm_LockCount == 0'
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Building - Failed to write file: resources.assets