This file contains hidden or 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 UnityEngine; | |
using UnityEngine.EventSystems; | |
public class UIZoomImage : MonoBehaviour, IScrollHandler | |
{ | |
private Vector3 initialScale; | |
[SerializeField] | |
private float zoomSpeed = 0.1f; | |
[SerializeField] |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using LitJson; | |
using UnityEngine.UI; | |
public class G6 : MonoBehaviour | |
{ | |
public string filePath; | |
public string jsonString; | |
public JsonData questionData; |
This file contains hidden or 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 UnityEngine; | |
using UnityEditor; | |
public class ReplaceWithPrefab : EditorWindow | |
{ | |
[SerializeField] private GameObject prefab; | |
[MenuItem("Tools/Replace With Prefab")] | |
static void CreateReplaceWithPrefab() | |
{ |
This file contains hidden or 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; | |
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) | |
{ |
This file contains hidden or 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 UnityEngine; | |
using UnityEditor; | |
[CustomEditor(typeof(SimpleAudioEvent), true)] | |
public class AudioEventEditor : Editor | |
{ | |
[SerializeField] private AudioSource _previewer; | |
public void OnEnable() |
This file contains hidden or 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; | |
public class MinMaxRangeAttribute : Attribute | |
{ | |
public float Min { get; private set; } | |
public float Max { get; private set; } | |
public MinMaxRangeAttribute(float min, float max) | |
{ | |
Min = min; |
This file contains hidden or 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; | |
[Serializable] | |
public struct RangedFloat | |
{ | |
public float minValue; | |
public float maxValue; | |
public RangedFloat(float minValue, float maxValue) | |
{ |
This file contains hidden or 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.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
public class CustomHierarchy : MonoBehaviour | |
{ | |
private static Vector2 offset = new Vector2(0, 2); | |
static CustomHierarchy() |
This file contains hidden or 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 UnityEngine; | |
public class CharacterControlSwapper : MonoBehaviour | |
{ | |
private Character[] characters; | |
int characterIndex; | |
private void Awake() | |
{ |
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.AI; | |
public class Character : MonoBehaviour | |
{ | |
private CharacterBrain brain; | |
private void Start() | |
{ | |
UseAIBrain(); |