Skip to content

Instantly share code, notes, and snippets.

@frideal
frideal / UnityExposedReferenceExample.cs
Last active Apr 9, 2020
Unity ExposedReference Example
View UnityExposedReferenceExample.cs
## Unity Exposed Reference Example
--------------------------------------MoveTarget.cs
namespace ScriptableObjectExample
{
public class MoveTarget : MonoBehaviour
{
}
@frideal
frideal / MoveComponentContext.cs
Created Jul 5, 2017 — forked from AngryAnt/MoveComponentContext.cs
Adds "Move to Top" and "Move to Bottom" items to the inspector context menu of components.
View MoveComponentContext.cs
using UnityEngine;
using UnityEditor;
public class MoveComponentContext
{
enum Destination
{
Top,
Bottom
@frideal
frideal / EditorWindowExample.cs
Created Jul 5, 2017 — forked from AngryAnt/EditorWindowExample.cs
EditorWindowExample from the Unity Asia Bootcamp 12 talk "Streamlining your Unity editor". A simple node based editor.
View EditorWindowExample.cs
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 Jun 22, 2016
Unity3d Play video on IOS and android
View PlayVideo.cs
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";
View AnimatedGifDrawer.cs
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.