Skip to content

Instantly share code, notes, and snippets.

View RimuruDev's full-sized avatar
🌅
Meow :3

Rimuru RimuruDev

🌅
Meow :3
View GitHub Profile
@ShuraProgerMain
ShuraProgerMain / CellIndexSearcher.cs
Created August 10, 2025 10:31
Search index in grid under mouse
using UnityEngine;
using UnityEngine.UI;
public class CellIndexSearcher
{
private readonly RectTransform _cellsContainer;
private readonly float _cellW;
private readonly float _cellH;
private readonly float _spaceX;
@adammyhre
adammyhre / Either.cs
Created December 1, 2024 12:29
Monads, Nullables, and the Power of Optionals in Unity
using System;
using System.Collections.Generic;
public struct Either<TLeft, TRight> {
readonly TLeft left;
readonly TRight right;
readonly bool isRight;
Either(TLeft left, TRight right, bool isRight) {
this.left = left;
@koster
koster / ChatGPTVerletRope.cs
Last active February 25, 2025 18:57
ChatGPT verlet rope
using UnityEngine;
public class VerletRope : MonoBehaviour
{
public Transform startPoint; // Начальная точка верёвки
public Transform endPoint; // Конечная точка верёвки
public int segmentCount = 10; // Количество сегментов верёвки
public float segmentLength = 0.2f; // Длина каждого сегмента
public int simulationIterations = 5; // Количество итераций симуляции
public float gravity = -9.8f; // Гравитация
@Argon42
Argon42 / unicode range.md
Last active August 16, 2025 15:03
Диапазоны юникод символов для языков

Расположение шрифтов языков в Unicode блоках

  • Basic Latin U+0000..U+007F (128 символов)
    • Английский алфавит
    • Датский алфавит
  • Basic Latin U+0000..U+007F, Latin-1 Supplement U+0080..U+00FF (256 символов)
    • Немецкий алфавит
    • Французский алфавит
    • Испанский алфавит
    • Итальянский алфавит
  • Португальский алфавит
@RimuruDev
RimuruDev / AndroidManifest.xml
Created September 25, 2024 08:46
CAS.AI Network security configuration :3
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
</domain-config>
</network-security-config>
@RimuruDev
RimuruDev / Failed_Build_Unity_GameAnalyticsILRD.markdown
Last active September 16, 2024 13:57
SOLVED! | Assets/GameAnalytics/Plugins/Scripts/ILRD/GameAnalyticsILRD.cs(12,33): error CS1069: The type name 'AndroidJavaClass' could not be found in the namespace 'UnityEngine'. This type has been forwarded to assembly 'UnityEngine.AndroidJNIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Enable the built in package 'Android JNI'…

Solved !

Problem - Failed Unity Android Build with GA (Porting the WEBGL project to Android *YandexGame->GooglePlay)

Error list:

Assets/GameAnalytics/Plugins/Scripts/ILRD/GameAnalyticsILRD.cs(12,33): error CS1069: The type name 'AndroidJavaClass' could not be found in the namespace 'UnityEngine'. This type has been forwarded to assembly 'UnityEngine.AndroidJNIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Enable the built in package 'Android JNI' in the Package Manager window to fix this error.
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class ObjectPool<T> where T : MonoBehaviour
{
private HashSet<T> prefabs = new();
private Transform poolContainer;
private bool autoExpand;
@MaksimSazanovich
MaksimSazanovich / HierarchyRandom.cs
Last active June 28, 2024 15:07
My modified version of Random class in C# which returns smaller values more often than bigger ones.
using UnityEngine;
namespace Unity_one_love
{
public static class HierarchyRandom
{
public static int Range(int minValue, int maxValue)
{
int firstSum = maxValue - minValue + 1;
int sum = firstSum * (firstSum + 1) / 2 + 1;
using System.Collections;
using UnityEngine;
using UnityEngine.EventSystems;
public class SwipeDetector : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler
{
private Vector2 lastPosition;
public Vector2 swipeDelta;
private Coroutine coroutine;
@olegmrzv
olegmrzv / PlayerLoopCleaner.cs
Created April 4, 2024 13:07
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