Site icon Tangled Reality Studios

How to Use objectReferenceValue – Unity Editor

Using objectReferenceValue with custom Unity editor fields can be tricky. The values don’t assign properly or you get confusing errors.

The key to making it work is to make sure the object you’re assigning is of type UnityEngine.Object.

Do not try to use UnityEngine.Object directly. It doesn’t work with memory management and your init will return null. Instead use ScriptableObject or MonoBehavior.

Exit mobile version