Too many massive prefabs

I have hundreds of massive prefabs stored within a scriptable object, and the game works by instantiating these prefabs at runtime at random

however, its getting to the point that unity editor crashes whenever i open a directory with the scriptable object. I assume how it works is that whenever there is a reference to the scriptable object, all of the game’s assets also have to be loaded too, no?

whats a non terrible solution?

the only alternative i can think of is splitting the prefabs into hundreds of scenes, including them in build, loading them at runtime and then doing GameObject.Find(“prefab-#432”); but that’s pretty terrible

something something asset bundles

I can think of two ways of the top of my head:

I haven’t used LazyLoadReference myself yet, but I would try this one first. Integrating Addressables in an existing project can be a tremendous task and I ran in many issues doing that.

1 Like