Skip to content

Instantly share code, notes, and snippets.

View johnsoncodehk's full-sized avatar

Johnson Chu johnsoncodehk

View GitHub Profile
@johnsoncodehk
johnsoncodehk / Fix55To54.cs
Last active February 24, 2020 06:44
Fix Unity 5.5 Downgrading to 5.4 missing GameObject name, activeSelf.
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections.Generic;
public class Fix55To54 {
[System.SerializableAttribute]
public class GameObjectData {
public bool activeSelf;
@johnsoncodehk
johnsoncodehk / YieldReturnExtension.cs
Last active October 2, 2018 16:51
Unity Coroutine -> Callback
/*
* https://gist.github.com/johnsoncodehk/17f05ebbeb1b7966efc4d5a176dd0bd8
*/
using UnityEngine;
using System;
using System.Collections;
public static class YieldReturnExtension
{
@johnsoncodehk
johnsoncodehk / CloneExtension.cs
Last active March 24, 2017 06:55
Unity GameObject Clone Extension
/*
* https://gist.github.com/johnsoncodehk/6da46453ce2f870b6f87f431bb267b9c
*/
using UnityEngine;
public static class CloneExtension {
public static GameObject Clone (this GameObject gameObject) {
GameObject newGameObject = Object.Instantiate (gameObject);