Skip to content

Instantly share code, notes, and snippets.

View pointcache's full-sized avatar
💭
status

pointcache pointcache

💭
status
View GitHub Profile
@pointcache
pointcache / GoBackSelection.cs
Created February 17, 2022 04:12
Go back to previously selected object
[InitializeOnLoad]
public static class GoBackSelection
{
static GoBackSelection()
{
Selection.selectionChanged -= HandleSelectionChange;
Selection.selectionChanged += HandleSelectionChange;
HandleSelectionChange();
}
using UnityEditor;
// Quickly recompile the project.
// Use only on empty project as it will erase your define symbols.
public static class Tool
{
static int count = 0;
[MenuItem("Tools/Reload _r")]
public static void Reload()
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DebugPanel : MonoBehaviour
{
private static DebugPanel i;
private void Awake()
{
i = this;
@pointcache
pointcache / BoneDrawer.cs
Created January 3, 2017 00:46
Hierarchy Visualizer
#if UNITY_EDITOR
namespace pointcache.utility
{
using UnityEngine;
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using System.Collections;
using UnityEditor;
using System;
public class FBXScaleOverride : AssetPostprocessor
{
int InModelCount;
void OnPreprocessModel()
using UnityEngine;
using UnityEditor;
class TextureImportOverrides : AssetPostprocessor
{
void OnPreprocessTexture()
{
TextureImporter textureImporter = (TextureImporter)assetImporter;
using UnityEngine;
using System;
using System.Collections.Generic;
//Create and call getcomponent through it instead.
public class ComponentCache
{
private GameObject owner;
private Dictionary<Type, Component> cache = new Dictionary<Type, Component>();
/// <summary>
/// Object that performs interpolation, works in tandem with Interpolator component
/// </summary>
public class TransformInterpolator
{
/// <summary>
/// target transform
/// </summary>
Transform transform;
/// <summary>
using UnityEngine;
using System;
using System.Collections.Generic;
public class ParentConstraint : MonoBehaviour
{
public UpdateMethod updateMethod;
public enum UpdateMethod
{
update,
using UnityEngine;
using System.Collections;
using UnityEngine.Networking;
public class RotationConstraint : MonoBehaviour
{
/* to keep the rotation on one axis at zero, remove the target transform and enable that axis*/
public Vector3 targetRotation; // The current rotation to constraint to, can be set manually if the target Transform is null