// Check for reference validity private bool CheckForReferenceValidity() { if(m_oRef == null || m_oRef.Owner != m_rOwner) { m_oRef = ScriptableObject.CreateInstance<ReferenceObject>(); m_oRef.Create(CreateReference(), m_rOwner, m_bOwnResource); #if UNITY_EDITOR EditorUtility.SetDirty(m_rOwner); #endif CheckForLostReferences(); return false; } return true; }
// Check for reference validity private bool CheckForReferenceValidity() { if (m_oRef == null || m_oRef.Owner != m_rOwner) { m_oRef = ScriptableObject.CreateInstance <ReferenceObject>(); m_oRef.Create(CreateReference(), m_rOwner, m_bOwnResource); #if UNITY_EDITOR EditorUtility.SetDirty(m_rOwner); #endif CheckForLostReferences(); return(false); } return(true); }