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 UnityEditor; | |
using UnityEngine; | |
public class SnapRectTransformAnchorsToCorners : MonoBehaviour | |
{ | |
[MenuItem("CONTEXT/RectTransform/Snap Anchors To Corners", priority = 50)] | |
private static void Execute(MenuCommand command) | |
{ | |
RectTransform rectTransform = command.context as RectTransform; | |
RectTransform parent = rectTransform.parent as RectTransform; |
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
// written by https://github.com/FreyaHolmer so use at your own risk c: | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary>Utility functions to copy GUIDs, as well as Copy/Paste import settings</summary> | |
public static class AssetCopyUtils { | |
const int CTX_MENU_LOCATION = 70; |
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 System.Collections.Generic; | |
using UnityEngine; | |
public class pipeGenerator : MonoBehaviour | |
{ | |
[SerializeField] Mesh straightMesh; | |
[SerializeField] Mesh elbowMesh; | |
[Space] | |
[SerializeField] Vector3[] pathPoints; |
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
// Original shader by @bgolus, modified slightly by @alexanderameye for URP, modified slightly more | |
// by @gravitonpunch for ECS/DOTS/HybridRenderer. | |
// https://twitter.com/bgolus | |
// https://medium.com/@bgolus/the-quest-for-very-wide-outlines-ba82ed442cd9 | |
// https://alexanderameye.github.io/ | |
// https://twitter.com/alexanderameye/status/1332286868222775298 | |
Shader "Hidden/Outline" | |
{ | |
Properties |
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.Linq; | |
using UnityEngine; | |
using UnityEngine.LowLevel; | |
using UnityEngine.PlayerLoop; | |
using static UnityEngine.PlayerLoop.PreLateUpdate; | |
public class ChangePlayerLoop : MonoBehaviour | |
{ | |
public bool defaultLoop = true; |
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 UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public class TextEditorWindow : EditorWindow | |
{ | |
VisualElement m_Suggestion; | |
TextField m_TextField; | |
[MenuItem("Test/Window")] |
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
Vector3 RelativeMouseAt() | |
{ | |
var mouseOverWindow = EditorWindow.mouseOverWindow; | |
System.Reflection.Assembly assembly = typeof(UnityEditor.EditorWindow).Assembly; | |
Type type = assembly.GetType("UnityEditor.GameView"); | |
int displayID = 0; | |
if (type.IsInstanceOfType(mouseOverWindow)) | |
{ | |
var displayField = type.GetField("m_TargetDisplay", BindingFlags.NonPublic | BindingFlags.Instance); |
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 Giacomelli.Framework | |
{ | |
public class FrameworkSettings : ScriptableObject | |
{ | |
[SerializeField] | |
bool _entityLogEnabled; | |
[SerializeField] |
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 UnityEditor; | |
public class CopyPasteValues | |
{ | |
const string kBufferName = "json-copy-buffer"; | |
const string kTypeName = "json-copy-type"; | |
[MenuItem("CONTEXT/Component/Copy Values With Json")] | |
static void Copy(MenuCommand command) |
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 UnityEditor; | |
using UnityEditor.Build; | |
using UnityEditor.Build.Reporting; | |
namespace BrunoMikoski.Framework.BuildTools | |
{ | |
public sealed class RidiculousFastBuild : IPostprocessBuildWithReport | |
{ | |
int IOrderedCallback.callbackOrder => 1000; |
NewerOlder