Skip to content

Instantly share code, notes, and snippets.

View GhatSmith's full-sized avatar

Ghat Smith GhatSmith

View GitHub Profile
@cosmogonies
cosmogonies / PrefabApplyCallback.cs
Last active March 8, 2022 14:36
Callback on Apply Prefab (Unity)
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
internal class PrefabExtension
{
static PrefabExtension()
{
UnityEditor.PrefabUtility.prefabInstanceUpdated += OnPrefabInstanceUpdate;
}
@Danik
Danik / UnityTweakGUI.cs
Last active August 6, 2021 14:03
A simple in-game parameter tweaking script for Unity. It finds all fields and properties marked with [TweakableMember] in MonoBehaviours in a scene, and enables tweaking in a GUI from inside the game, which can be useful on tablets etc, where there is no access to the inspector.
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
///<summary>
/// A simple in-game GUI for Unity that allows tweaking of script fields
/// and properties marked with [TweakableMember]
///</summary>
@BlueRyth
BlueRyth / SyncAnimationControllerTool.cs
Last active August 7, 2018 13:53
Unity3D: Sync the Animation window to an Animator without requiring hierarchy selection (4.6.x)
using System;
using System.Reflection;
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
/// <summary>
/// Class to synchronize the view of the Animator window without requiring hierarchy selection
/// </summary>
class SyncAnimationControllerTool