Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

On build only, FindObjectsOfTypeAll does not exist in the current context"

$
0
0
I am removing textures from memory (loaded from Resources) using Resources.FindObjectsOfTypeAll(). My script works fine in the editor using UnityEngine; using UnityEditor; using System.Collections.Generic; public class AppController : MonoBehaviour { public static void RemoveAllTexturesFromMemory(){ // find all loaded textures Texture2D[] ts = FindObjectsOfTypeAll(typeof(Texture2D)) as Texture2D[]; Debug.Log("Number of all loaded Textures " + ts.Length); // remove based on name here ... } } ...but when I attempt to build I get the following error: `error CS0103: The name FindObjectsOfTypeAll does not exist in the current context` What could be causing this issue?

Viewing all articles
Browse latest Browse all 4709

Trending Articles