Skip to content

Instantly share code, notes, and snippets.

[MenuItem("Edit/Search missing references in prefabs (Full project)", false, 50)]
public static void FindMissingReferencesInProject()
{
UnityEngine.Debug.Log("Starting search for missing components in project prefabs");
var paths = AssetDatabase.FindAssets("t:prefab").ToList().Select(guid => AssetDatabase.GUIDToAssetPath(guid));
foreach (var path in paths)
{
var go = AssetDatabase.LoadAssetAtPath<GameObject>(path);
var components = go.GetComponents<Component>();
@UCh
UCh / FPSCounter.cs
Created July 7, 2016 09:42
Unity FPS counter for UI text component with minimal memory allocation
using System.Text;
using UnityEngine;
using UnityEngine.UI;
public class FPSCounter : MonoBehaviour {
private static readonly string FPS = " FPS ";
private static readonly int STRING_SIZE = FPS.Length + 2;
private Text textField;