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.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEditor; | |
| using UnityEngine; | |
| namespace STMMfyd | |
| { | |
| public static class EnumBuilder |
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 System.Collections; | |
| public static class DrawArrow | |
| { | |
| public static void ForGizmo(Vector3 pos, Vector3 direction, float arrowHeadLength = 0.25f, float arrowHeadAngle = 20.0f) | |
| { | |
| Gizmos.DrawRay(pos, direction); | |
| Vector3 right = Quaternion.LookRotation(direction) * Quaternion.Euler(0,180+arrowHeadAngle,0) * new Vector3(0,0,1); |
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 UnityEditor; | |
| using UnityEngine; | |
| [CustomEditor(typeof(Transform))] | |
| public class TransformEditorExtension : Editor | |
| { | |
| private const float ButtonWidth = 24f; | |
| private GUIContent resetIcon; | |
| private GUIContent lockIconOn; |
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
| git lfs ls-files -n > lfs_files_list.txt | |
| $lfsFiles = Get-Content lfs_files_list.txt | ForEach-Object { | |
| $_.Trim() | |
| } | |
| $fileSizes = @() | |
| foreach ($file in $lfsFiles) { | |
| if (Test-Path $file) { | |
| $sizeMB = (Get-Item $file).Length / 1MB |
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
| extends RigidBody3D | |
| var mouse_sensitivity := 0.001 | |
| var twist_input := 0.0 | |
| var pitch_input := 0.0 | |
| @onready var twist_pivot := $TwistPivot | |
| @onready var pitch_pivot := $TwistPivot/PitchPivot | |
| func _ready() -> void: |
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
| // c# companion script | |
| // SpriteUVToShader.cs -------------------------------------------------------------------------------------------------------------------------------- // | |
| // Save you your project, add to your SpriteRenderer gameObject | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| [ExecuteInEditMode] |
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
| from http.server import SimpleHTTPRequestHandler | |
| from http.server import socketserver | |
| class CORSHTTPRequestHandler(SimpleHTTPRequestHandler): | |
| def send_head(self): | |
| """Common code for GET and HEAD commands. | |
| This sends the response code and MIME headers. | |
| Return value is either a file object (which has to be copied | |
| to the outputfile by the caller unless the command was HEAD, |
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; | |
| public class DistanceJoint3D : MonoBehaviour { | |
| public Transform ConnectedRigidbody; | |
| public bool DetermineDistanceOnStart = true; | |
| public float Distance; | |
| public float Spring = 0.1f; | |
| public float Damper = 5f; |