Created
February 10, 2018 02:21
-
-
Save lynxelia/f2f72b6b8563428e08c44b6ebb416690 to your computer and use it in GitHub Desktop.
Example of a class that has an UnityEngine.Object field reference that will be garbage collected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReferenceHolder : MonoBehaviour | |
{ | |
public Sprite m_SpriteValue; | |
void OnDestroy() | |
{ | |
m_SpriteValue = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment