This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class SwipeDetector : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler | |
{ | |
private Vector2 lastPosition; | |
public Vector2 swipeDelta; | |
private Coroutine coroutine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RimuruDev | |
# https://github.com/RimuruDev | |
**idea/ | |
**.idea/ | |
**.ws/ | |
**.vs/ | |
**/[Bb]uilds/ | |
*/[Tt]rash/ | |
*/[Tt]rash.meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// **************************************************************** // | |
// | |
// 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 | |
// | |
// **************************************************************** // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ReSharper disable All | |
// **************************************************************** // | |
// | |
// 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/ | |
// | |
// **************************************************************** // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('orientationchange', function () | |
{ | |
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent) && typeof screen.orientation !== 'undefined') | |
{ | |
switch (screen.orientation.type) | |
{ | |
case 'portrait-primary': | |
case 'portrait-secondary': | |
canvas.style.background = "url('portrait.png') center / cover"; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ReSharper disable All | |
// **************************************************************** // | |
// | |
// Copyright (c) RimuruDev. All rights reserved. | |
// Contact me: rimuru.dev@gmail.com | |
// | |
// **************************************************************** // | |
using UnityEngine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ReSharper disable CommentTypo | |
// **************************************************************** // | |
// | |
// Copyright (c) RimuruDev. All rights reserved. | |
// Contact me: | |
// - Gmail: rimuru.dev@gmail.com | |
// - LinkedIn: https://www.linkedin.com/in/rimuru/ | |
// - Gists: https://gist.github.com/RimuruDev/61e9f0111b35d3e67ef18fab611d7595 | |
// **************************************************************** // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add for all scripts #if UNITY_WEBGL | |
Example | |
using UnityEngine; | |
using UnityEngine.UI; | |
#if UNITY_WEBGL | |
namespace YG.Example | |
{ |
NewerOlder