This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class SimpleSoundManager:MonoBehaviour { | |
// Audio source | |
private AudioSource musicSrc; | |
private AudioSource effectSrc; | |
// Instance variable | |
private static SimpleSoundManager instance; | |
// Instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MenuItem("Utils/Make Unprefabbed Clone")] | |
static public void CloneDisconnectedPrefab() { | |
foreach(GameObject go in Selection.gameObjects) { | |
Object.Instantiate(go); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[MenuItem("Utils/Delete All PlayerPrefs")] | |
static public void DeleteAllPlayerPrefs() { | |
PlayerPrefs.DeleteAll(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
public class Force2DSound:AssetPostprocessor { | |
public void OnPreprocessAudio() { | |
AudioImporter ai = assetImporter as AudioImporter; | |
ai.threeD = false; | |
} | |
} |