Skip to content

Instantly share code, notes, and snippets.

@frideal
frideal / UnityExposedReferenceExample.cs
Last active October 31, 2023 04:32
Unity ExposedReference Example
## Unity Exposed Reference Example
--------------------------------------MoveTarget.cs
namespace ScriptableObjectExample
{
public class MoveTarget : MonoBehaviour
{
}
@frideal
frideal / MoveComponentContext.cs
Created July 5, 2017 05:44 — forked from AngryAnt/MoveComponentContext.cs
Adds "Move to Top" and "Move to Bottom" items to the inspector context menu of components.
using UnityEngine;
using UnityEditor;
public class MoveComponentContext
{
enum Destination
{
Top,
Bottom
@frideal
frideal / EditorWindowExample.cs
Created July 5, 2017 05:43 — forked from AngryAnt/EditorWindowExample.cs
EditorWindowExample from the Unity Asia Bootcamp 12 talk "Streamlining your Unity editor". A simple node based editor.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class EditorWindowExample : EditorWindow
{
List<Node> nodes = new List<Node> ();
@frideal
frideal / PlayVideo.cs
Last active June 22, 2016 15:18
Unity3d Play video on IOS and android
using UnityEngine;
using System.Collections;
using System.IO;
public class PlayVideo : MonoBehaviour
{
private string streamingPath = string.Empty;
private string urlStreamPath = string.Empty;
private string streamingFileMp4Name = "test001.mp4";
@frideal
frideal / AnimatedGifDrawer.cs
Created February 15, 2016 10:11
GIf播放器
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using UnityEngine;
using UnityEngine.UI;
//AnimatedGifDrawer
//The following script can be used to draw animated Gif images on-screen in Unity.It uses the "Image" and "Graphics" class from the System.Drawing namespace, and so requires the "System.Drawing.dll" file to be imported/added to the project.
//Instructions:
//1) Copy the "System.Drawing.dll" file in the "C:\Program Files (x86)\Unity\Editor\Data\Mono\lib\mono\2.0" folder into your "Assets" folder.