Skip to content

Instantly share code, notes, and snippets.

View RimuruDev's full-sized avatar
🌟
Find Job

Rimuru RimuruDev

🌟
Find Job
View GitHub Profile
@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
@RimuruDev
RimuruDev / manifest.json
Created October 10, 2023 11:16
NakamaServer
{
"dependencies": {
"com.unity.feature.2d": "2.0.0",
"com.unity.ide.rider": "3.0.24",
"com.unity.textmeshpro": "3.0.6",
"com.unity.ugui": "1.0.0",
"com.unity.visualscripting": "1.9.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
public static class Utils
{
public static uint GetTrueRandomUInt()
{
// use Crypto RNG to avoid having time based duplicates
using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider())
{
byte[] bytes = new byte[4];
rng.GetBytes(bytes);
return BitConverter.ToUInt32(bytes, 0);
public static class MatchExtension
{
public static Guid ToGuid(this string id)
{
var provider = new MD5CryptoServiceProvider();
var inputBytes = Encoding.Default.GetBytes(id);
var hasBytes = provider.ComputeHash(inputBytes);
return new Guid(hasBytes);
}