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 / .gitattributes
Created September 17, 2023 11:32 — forked from olegmrzv/.gitattributes
Git LFS Attributes for Unity Game Engine
# Git LFS tracking file types
# IronSource
*.a filter=lfs diff=lfs merge=lfs -text
IS*Adapter filter=lfs diff=lfs merge=lfs -text
GoogleMobileAds filter=lfs diff=lfs merge=lfs -text
# Image
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
@RimuruDev
RimuruDev / README.md
Created June 6, 2023 19:12 — forked from JohannesDeml/README.md
Remove Unity mobile notification warning for WebGL builds

Remove warning

Unity shows the following warning on mobile devices up to Unity 2019.4: "Please note that Unity WebGL is not currently supported on mobiles. Press OK if you wish to continue anyway." This script helps you remove this warning

Live example

To see live examples see Unity Web GL Loading Test

Logic

The script will run after the build has completed and replace the checks from all generated javascript files.

Support

@RimuruDev
RimuruDev / MeshDestroy.cs
Created January 13, 2023 20:36 — forked from ditzel/MeshDestroy.cs
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;
@RimuruDev
RimuruDev / repository.md
Created January 11, 2023 15:14 — forked from maestrow/repository.md
Паттерн репозиторий

Паттерн репозиторий

Репозиторий - это слой абстракции, инкапсулирующий в себе всё, что относится к способу хранения данных. Назначение: Разделение бизнес-логики от деталей реализации слоя доступа к данным.

Паттерн Репозиторий стал популярным благодаря DDD (Domain Driven Design). В противоположность к Database Driven Design в DDD разработка начинается с проектирования бизнес логики, принимая во внимание только особенности предметной области и игнорируя все, что связано с особенностями базы данных или других способов хранения данных. Способ хранения бизнес объектов реализуется во вторую очередь.

Применение данного паттерна не предполагает создание только одного объекта репозитория во всем приложении. Хорошей практикой считается создание отдельных репозиториев для каждого бизнес-объекта или контекста, например: OrdersRepository, UsersRepository, AdminRepository.

Пример

@RimuruDev
RimuruDev / BuildDisplayer.cs
Created January 5, 2023 10:06 — forked from llamacademy/BuildDisplayer.cs
Build Incrementor Scripts from https://www.youtube.com/watch?v=PbFE0m9UMtE. If you get value from LlamAcademy, consider becoming a Patreon supporter at https://www.patreon.com/llamacademy
using TMPro;
using UnityEngine;
[RequireComponent(typeof(TextMeshProUGUI))]
public class BuildDisplayer : MonoBehaviour
{
private TextMeshProUGUI Text;
private void Awake()
{
@RimuruDev
RimuruDev / introrx.md
Created December 4, 2022 16:35 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing