Skip to content

Instantly share code, notes, and snippets.

View isaveu's full-sized avatar

James park isaveu

  • YMX Inc
  • Seoul, Korea
View GitHub Profile
@isaveu
isaveu / AppendImageExtension.cs
Created November 19, 2020 04:22 — forked from ChuckSavage/AppendImageExtension.cs
C# Is file an image and get its type
// Includes a mini-program for checking and fixing files that have no extension
// Only checks for the most common types
// If you create a better version, please upload it here.
using System;
using System.Collections.Generic;
using System.IO;
namespace AppendJPG
{
@isaveu
isaveu / ScreenshotUtility.cs
Created July 14, 2020 08:53 — forked from atesija/ScreenshotUtility.cs
Simple Unity screenshot on timer script
using UnityEngine;
using System.Collections;
public class ScreenshotUtility : MonoBehaviour
{
[Tooltip("The filepath to the save location for the screenshots")]
public string _filepath;
[Tooltip("Scales the image by the amount specified (0 for no scaling)")]
public int _screenshotResolutionScaleFactor = 0;
@isaveu
isaveu / MinMaxSliderAttribute.cs
Created July 3, 2020 06:38 — forked from frarees/MinMaxSliderAttribute.cs
MinMaxSlider for Unity3D
// https://frarees.github.io/default-gist-license
using System;
using UnityEngine;
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class MinMaxSliderAttribute : PropertyAttribute
{
public readonly float min;
public readonly float max;
@isaveu
isaveu / Greyscale.cs
Created June 23, 2020 22:26 — forked from CptAsgard/Greyscale.cs
Unity Greyscale image effect
using UnityEngine;
using System.Collections;
public class Greyscale : MonoBehaviour {
public Material mat;
void Start() {
mat.SetFloat( "_Power", 0.0f );
}
@isaveu
isaveu / Greyscale.cs
Created June 23, 2020 22:26 — forked from CptAsgard/Greyscale.cs
Unity Greyscale image effect
using UnityEngine;
using System.Collections;
public class Greyscale : MonoBehaviour {
public Material mat;
void Start() {
mat.SetFloat( "_Power", 0.0f );
}
@isaveu
isaveu / ClipboardNotification.cs
Created May 8, 2020 06:08 — forked from glombard/ClipboardNotification.cs
Monitor Clipboard changes in C# using AddClipboardFormatListener / WM_CLIPBOARDUPDATE. See Clipboard class: http://msdn.microsoft.com/en-us/library/system.windows.clipboard(v=vs.110).aspx
// from: http://stackoverflow.com/questions/2226920/how-to-monitor-clipboard-content-changes-in-c
/// <summary>
/// Provides notifications when the contents of the clipboard is updated.
/// </summary>
public sealed class ClipboardNotification
{
/// <summary>
/// Occurs when the contents of the clipboard is updated.
/// </summary>
/*****************************************************************
LSM9DS0_AHRS.ino
SFE_LSM9DS0 Library AHRS Data Fusion Example Code
Jim Lindblom @ SparkFun Electronics
Original Creation Date: February 18, 2014
https://github.com/sparkfun/LSM9DS0_Breakout
Modified by Kris Winer, April 4, 2014
The LSM9DS0 is a versatile 9DOF sensor. It has a built-in
@isaveu
isaveu / CustomEditorBase.cs
Created November 13, 2019 03:59 — forked from t0chas/CustomEditorBase.cs
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
using UnityEditor.AnimatedValues;
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)]
[CanEditMultipleObjects]
public class CustomEditorBase : Editor
{
@isaveu
isaveu / ParticleScaler.cs
Created October 7, 2019 04:29 — forked from treefortress/ParticleScaler.cs
Scale Unity ParticleSystem at Runtime
using UnityEngine;
public static class ParticleExtensions
{
/// Add Extension to the native ParticleSystem class.
/// eg: myParticleSystem.Scale(2);
public static void Scale(this ParticleSystem particles, float scale, bool includeChildren = true) {
ParticleScaler.Scale(particles, scale, includeChildren);
}
@isaveu
isaveu / ParticleScaler.cs
Created October 7, 2019 04:29 — forked from treefortress/ParticleScaler.cs
Scale Unity ParticleSystem at Runtime
using UnityEngine;
public static class ParticleExtensions
{
/// Add Extension to the native ParticleSystem class.
/// eg: myParticleSystem.Scale(2);
public static void Scale(this ParticleSystem particles, float scale, bool includeChildren = true) {
ParticleScaler.Scale(particles, scale, includeChildren);
}