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.Reflection; | |
public static class Reflector | |
{ | |
public const BindingFlags DefaultBindingFlags = BindingFlags.Instance | BindingFlags.Static | | |
BindingFlags.Public | BindingFlags.NonPublic; | |
#region Type/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 System; | |
using UnityEditor.Animations; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
// NOTE: The Reflector.cs is here: https://gist.github.com/SolarianZ/e8980ee322182a76745e6cb5aac99b4d | |
// Usage(function calling hierarchy): | |
// 1. YourCustomInpector.OnEnable() -> _motionPreview = new MotionPreview(); | |
// 2. YourCustomInpector.OnPreviewSettings() -> _motionPreview.OnPreviewSettings(); |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
using UnityEditor; | |
using UnityEngine; | |
using UDebug = UnityEngine.Debug; | |
public static class AnimationClipCurveTool | |
{ | |
#region Playable Binding |
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.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
[InitializeOnLoad] | |
public static class CustomEditorToolbar | |
{ | |
#region TimeScale Slider |
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 MissingScriptTool | |
{ | |
[MenuItem("Tools/Bamboo/GameObject/Log GameObjects with Missing Script in Loaded Scenes")] | |
public static void LogGameObjectsWithMissingScriptInLoadedScenes() | |
{ | |
var missingScriptCount = 0; | |
var sceneCount = SceneManager.loadedSceneCount; | |
for (var i = 0; i < sceneCount; i++) | |
{ | |
var scene = SceneManager.GetSceneAt(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
using System; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.UIElements; | |
public static class AnimationClipEventTool | |
{ | |
#region Log Animation Events |
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.Diagnostics; | |
using UnityEngine; | |
using UDebug = UnityEngine.Debug; | |
public static class DebugDrawer | |
{ | |
public static byte CircleResolution | |
{ | |
get => _circleResolution; | |
set |
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
// Visualizer(In Unity Engine): https://gist.github.com/SolarianZ/a53363f0994aa7858d9e0a08ecf3f014 | |
using System; | |
using System.Numerics; | |
// Note: This is not a precise simulator. | |
public class SimpleHarmonicMotion | |
{ | |
/// <summary> | |
/// The natural frequency of the system measured in Hz. |
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
// NOTE: The 'SimpleHarmonicMotion.cs' is here: https://gist.github.com/SolarianZ/78f9b22d9663d77b6e6c1b0c60cc6322 | |
using UnityEngine; | |
using SVector3 = System.Numerics.Vector3; | |
using UVector3 = UnityEngine.Vector3; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[DisallowMultipleComponent] |
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
// NOTE: The 'SimpleHarmonicMotion.cs' is here: https://gist.github.com/SolarianZ/78f9b22d9663d77b6e6c1b0c60cc6322 | |
// You need to change `System.Numerics.Vector3` to `UnityEngine.Vector3` in SimpleHarmonicMotion.cs | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[DisallowMultipleComponent] | |
public class BoneVibrator : MonoBehaviour |
OlderNewer