nostek / UnityWeakReferences

Hard references to prefabs are converted to weak references at build time
MIT License
9 stars 1 forks source link
unity weak-references

UnityWeakReferences

Hard references to prefabs are converted to weak references at build time.

Installation

Copy the UnityWeakReference folder in to your project. Use WeakPrefab/WeakSprite/WeakTexture2D/WeakAudioClip in your MonoBehaviour/Array/List/Custom Class and fill out the field in the editor. All set!

Example

public WeakPrefab MyPrefab;

void Start() { Instantiate(MyPrefab.Prefab); }

Supported types

Known issues