Skip to content

Instantly share code, notes, and snippets.

View b-cancel's full-sized avatar

Bryan Cancel b-cancel

View GitHub Profile
@anchan828
anchan828 / SceneAttribute.cs
Created December 10, 2012 16:36
インスペクターでシーン名をEnumで選択できるプロパティ拡張
using UnityEngine;
public class SceneAttribute : PropertyAttribute
{
public int selectedValue = 0;
public SceneAttribute ()
{
}
}
@AngryAnt
AngryAnt / MultiScene.cs
Created August 9, 2013 10:03
This utility lets you easily combine two scenes into one.
using UnityEngine;
using UnityEditor;
using System.IO;
public class MultiScene
{
[MenuItem ("File/Combine Scenes")]
static void Combine ()
{
@yuseinishiyama
yuseinishiyama / DontDestroyObject.cs
Created January 17, 2014 02:42
Attaching this script to a object, the object survives in all scenes. (For Unity3d)
using UnityEngine;
using System.Collections;
public class DontDestroyObject : MonoBehaviour
{
static DontDestroyObject instance;
void Awake ()
{
if (!instance) {
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@sheharyarn
sheharyarn / YoutubeDownloader.md
Last active October 15, 2022 06:26
Download Videos from Youtube in (Ruby || PHP)

Youtube Downloaders

Download Youtube Videos using Ruby or PHP

Just copy the appropriate script, provide the video_id and run. It will list download links for different qualities and streams.

:P

using System;
using System.IO;
using UnityEditor;
public static class SceneCreator
{
[MenuItem( "Assets/Create/Empty Scene" )]
private static void CreateEmptyScene()
{
CreateScene(
@mandarinx
mandarinx / NineSliceScaling.cs
Last active July 22, 2022 02:43
9 slice scaling with a mesh in Unity3D
using UnityEngine;
// Nine slice scaling using a Mesh.
// Original code by Asher Vollmer
// https://twitter.com/AsherVo
// http://ashervollmer.tumblr.com
// Modifications by Thomas Viktil
// https://twitter.com/mandarinx
// http://ma.ndar.in/
@allfake
allfake / FadeInOut.cs
Created August 4, 2015 11:10
From http://answers.unity3d.com/questions/119918/transitions-between-changing-scenes.html change to only fade, add hook function, you need to add image in gameObject.
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
using System.Reflection;
using System;
public class FadeInOut : MonoBehaviour {
[Serializable]
@FVSHaLuan
FVSHaLuan / StartWithSpecificScene.cs
Last active April 26, 2017 21:34
**Function: - Add menu DoC/Start with first game scene to Unity3D editor main menus. - The menu starts playing your game from the specified scene and brings you back to the scene you were editting when stop playing
using UnityEngine;
using System.Collections;
using UnityEditor;
/* by FVS - Ha Luan */
public class StartWithSpecificScene : Editor
{
const string settingKey = "FVSHaluanStartWithSpecificScene";
const string firstScenePath = "Assets/Scenes/Login.unity";
@SeeringPhil
SeeringPhil / Player1CtrlRemap.cs
Last active April 26, 2017 22:35
This is the class we're using for being able to modify the first player's controls in game and for the assigned controls to persist across scenes ( thus the keycodes being static.)
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class Player1CtrlRemap : MonoBehaviour
{
// Initialisation of player's controls.
public GameObject upBtn, downBtn, lftBtn, rightBtn;
public btnInit bI;