Skip to content

Instantly share code, notes, and snippets.

View mi1890's full-sized avatar
💭
Confusing

M1890's mi1890

💭
Confusing
  • BEIJING
View GitHub Profile

How to Use?

GUIStyle mystyle = new GUIStyle("some string from the list below");


UnityEditor.ConsoleWindow.Constants

  • "CN Box"
  • "Button"

Initialization

UniTaskLoopRunnerYieldInitialization
UniTaskLoopRunnerInitialization
PlayerUpdateTime
DirectorSampleTime
AsyncUploadTimeSlicedUpdate
SynchronizeInputs
SynchronizeState
XREarlyUpdate

@mi1890
mi1890 / ZiplineBrush.cs
Created September 12, 2023 16:37 — forked from bengreenier/ZiplineBrush.cs
First unity custom brush
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.Tilemaps;
namespace Assets.Scripts.Editor
{
@mi1890
mi1890 / FloatingOrigin.cs
Created September 24, 2022 12:01 — forked from brihernandez/FloatingOrigin.cs
Floating origin to handle large worlds in Unity.
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling
// URL: http://wiki.unity3d.com/index.php/Floating_Origin
using UnityEngine;
using UnityEngine.SceneManagement;
public class FloatingOrigin : MonoBehaviour
{
[Tooltip("Point of reference from which to check the distance to origin.")]
public Transform ReferenceObject = null;
@mi1890
mi1890 / .gitattributes
Created June 17, 2022 07:14 — forked from Srfigie/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@mi1890
mi1890 / SavWav.cs
Created August 1, 2017 02:37 — forked from darktable/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions: