Quantcast
Channel: iOS and tvOS
Viewing all articles
Browse latest Browse all 10823

Reference to a prefab in the script will increase memory usage?

$
0
0
I declare some public variables in a script, and assign prefabs to them in the inspector. Like this:
Code (csharp):
  1. public class EffectSpawner : MonoBehaviour {
  2.   public  GameObject fireEffect;
  3.   public  GameObject iceEffect;
  4. }
Then I found my app's memory usage increase by 10mb. (iOS platform)
When reference a prefab in the script, unity will load the prefab into memory even before instantiate it, right?
If this is true, it will be so sad! Because I made lots of effects, which will be...

Reference to a prefab in the script will increase memory usage?

Viewing all articles
Browse latest Browse all 10823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>