Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using UnityEngine.EventSystems;
public class UIZoomImage : MonoBehaviour, IScrollHandler
{
private Vector3 initialScale;
[SerializeField]
private float zoomSpeed = 0.1f;
[SerializeField]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LitJson;
using UnityEngine.UI;
public class G6 : MonoBehaviour
{
public string filePath;
public string jsonString;
public JsonData questionData;
using UnityEngine;
using UnityEditor;
public class ReplaceWithPrefab : EditorWindow
{
[SerializeField] private GameObject prefab;
[MenuItem("Tools/Replace With Prefab")]
static void CreateReplaceWithPrefab()
{
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(RangedFloat))]
public class RangedFloatDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(SimpleAudioEvent), true)]
public class AudioEventEditor : Editor
{
[SerializeField] private AudioSource _previewer;
public void OnEnable()
using System;
public class MinMaxRangeAttribute : Attribute
{
public float Min { get; private set; }
public float Max { get; private set; }
public MinMaxRangeAttribute(float min, float max)
{
Min = min;
using System;
[Serializable]
public struct RangedFloat
{
public float minValue;
public float maxValue;
public RangedFloat(float minValue, float maxValue)
{
using System.Linq;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public class CustomHierarchy : MonoBehaviour
{
private static Vector2 offset = new Vector2(0, 2);
static CustomHierarchy()
using UnityEngine;
public class CharacterControlSwapper : MonoBehaviour
{
private Character[] characters;
int characterIndex;
private void Awake()
{
using UnityEngine;
using UnityEngine.AI;
public class Character : MonoBehaviour
{
private CharacterBrain brain;
private void Start()
{
UseAIBrain();