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
public static class IOHelper | |
{ | |
public static void ListDirsOnDir(string dir) | |
{ | |
if (!Directory.Exists(dir)) | |
return; | |
string[] dirs = Directory.GetDirectories(dir); | |
foreach (var d in dirs) | |
ListDirsOnDir(d); |
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.Runtime.CompilerServices; | |
[assembly: InternalsVisibleTo("#Assembly.Name")] |
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 System.Collections.Generic; | |
using UnityEditor; | |
using UnityEditor.Compilation; | |
using UnityEngine; | |
public class CompileTime | |
{ | |
private const string RELOAD_TIME_KEY = "AssemblyReloadEventsTime"; | |
private const string COMPILATION_TIME_KEY = "CompileStartTime"; |
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; | |
using UnityEngine.UI; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class EmptyGraphics : Graphic | |
{ | |
protected override void OnPopulateMesh(VertexHelper vh) | |
{ |
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; | |
using UnityEngine.EventSystems; | |
public class SensitiveInteractuables : MonoBehaviour, IPointerDownHandler, IPointerUpHandler | |
{ | |
public void OnPointerDown(PointerEventData eventData) | |
{ | |
m_initialDragThreshold = EventSystem.current.pixelDragThreshold; | |
EventSystem.current.pixelDragThreshold = m_newTreshold; | |
} |
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
public static class Extensions | |
{ | |
public static string TrimDouble(this string temp) | |
{ | |
var value = temp.IndexOf('.') == -1 ? temp : temp.TrimEnd('.', '0'); | |
return value == string.Empty ? "0" : value; | |
} | |
} |
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; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
public class NestedScrollRect : ScrollRect | |
{ | |
public override void OnInitializePotentialDrag(PointerEventData eventData) | |
{ | |
for(int i = 0; i < m_parentInitializePotentialDragHandlers.Length; ++i) | |
{ |
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
/** | |
MIT License | |
Copyright (c) 2022 Josef21296 | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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; | |
public class CameraMovement : MonoBehaviour | |
{ | |
void Update() | |
{ | |
float movSpeed = m_cameraMovementSpeed; | |
float rotSpeed = m_cameraRotationSpeed; | |
if(Input.GetKey(KeyCode.LeftShift)) |
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
git reflog | |
git cherry-pick [commit id or short code] => copies a commit into current head |