Skip to content

Instantly share code, notes, and snippets.

Avatar

Benoit FOULETIER benblo

View GitHub Profile
@benblo
benblo / CompilationTimeTracker.cs
Created Feb 11, 2019
Measure compilation times in Unity (import, compilation, domain reload). Can export results to a json Chrome trace file.
View CompilationTimeTracker.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEngine;
using UnityEditor;
using UnityEditor.Compilation;
@benblo
benblo / MIT-license.md
Last active Jul 14, 2017
This license applies to all public gists https://gist.github.com/benblo
View MIT-license.md
@benblo
benblo / gist:d8b31eab90195208cc38
Last active Apr 23, 2019
Disable AudioManager from build script
View gist:d8b31eab90195208cc38
var audioManager = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/AudioManager.asset")[0];
var serializedManager = new SerializedObject(audioManager);
var prop = serializedManager.FindProperty("m_DisableAudio");
prop.boolValue = true;
serializedManager.ApplyModifiedProperties();
@benblo
benblo / SceneUtility.cs
Created Apr 15, 2014
Utility to open all scenes of a Unity project and process them: resave, refactor data, etc. To be used with EditorCoroutines: https://gist.github.com/benblo/10732554
View SceneUtility.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using Object = UnityEngine.Object;
using UnityEditor;
namespace Swing.Editor
{
@benblo
benblo / EditorCoroutine.cs
Created Apr 15, 2014
EditorCoroutine: coroutines for Unity editor operations. Usage: EditorCoroutine.start(myIEnumerator)
View EditorCoroutine.cs
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Swing.Editor
{
public class EditorCoroutine
You can’t perform that action at this time.