Check if root has negative scale, then connected anchor needs to be manual and set to negative!
This file contains hidden or 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
| // https://forum.unity.com/threads/lets-discuss-sorting-with-jobs.553288/ | |
| using System.Collections.Generic; | |
| using Unity.Burst; | |
| using Unity.Collections; | |
| using Unity.Jobs; | |
| using UnityEngine; | |
| namespace Cradle | |
| { | |
| /// <summary> |
This file contains hidden or 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
| // https://forum.unity.com/threads/adding-hue-saturation-and-contrast-to-standardshader.843697/#post-5572063 | |
| Shader "HueContrastSaturation" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,1,1,1) | |
| _MainTex ("Albedo Map", 2D) = "black" {} | |
| _BumpMap ("Normal Map", 2D) = "bump" {} | |
| _MetallicGlossMap ("Metallic (R) Smoothness (A) Map", 2D) = "black" {} | |
| _Hue ("Hue", Float) = 1.0 |
This file contains hidden or 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
| // https://forum.unity.com/threads/drawing-an-animated-arc-on-the-screen.1210524/ | |
| using UnityEngine; | |
| using System.Collections; | |
| public class Arc : MonoBehaviour | |
| { | |
| public Shader ArcShader; | |
| private Material _Material; | |
| void Start() |
This file contains hidden or 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
| // https://forum.unity.com/threads/screenspace-uv.1207651/#post-7735020 | |
| Shader "Unlit/ScreenSpaceUVTest" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" "DisableBatching"="True" } |
This file contains hidden or 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
| // https://stackoverflow.com/a/46301111/5452781 | |
| // NOTE should disable if not in editor mode | |
| public class EditorCameraController : MonoBehaviour | |
| { | |
| public float sensitivityX = 15F; | |
| public float sensitivityY = 15F; | |
| public float minimumX = -360F; | |
| public float maximumX = 360F; | |
| public float minimumY = -60F; |
This file contains hidden or 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
| // https://forum.unity.com/threads/linerenderer2d-gpu-pixel-perfect-2d-line-renderer-for-unity-urp-2d-renderer.1021708/#post-7663765 | |
| Shader "Unlit/PixelPerfectLineShader" | |
| { | |
| Properties | |
| { | |
| _Endpoint ("Endpoint", Vector) = (0, 0, 10, 10) | |
| _Thickness ("Thickness", float) = 1 | |
| _BlockSize ("BlockSize", int) = 1 | |
| } | |
| SubShader |
This file contains hidden or 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
| // Drawing a line with UITK https://forum.unity.com/threads/drawing-a-line-with-uitk.1193470/ | |
| public class LineDrawer : VisualElement | |
| { | |
| private Vector3 startPos, endPos; | |
| private float thickness; | |
| public LineDrawer(Vector3 pos1, Vector3 pos2, float width) | |
| { | |
| startPos = pos1; | |
| endPos = pos2; |
This file contains hidden or 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 CameraEditorMovement : MonoBehaviour | |
| { | |
| [Header("Mouse")] | |
| public float lookSpeedH = 2f; | |
| public float lookSpeedV = 2f; | |
| public float zoomSpeed = 2f; |
This file contains hidden or 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.Events; | |
| public class MouseFingerEvent | |
| { | |
| public Vector2 position; | |
| public int index; | |
| } | |
| public class MouseFinger : MonoBehaviour |