/// <summary> /// Retains the entity. An owner can only retain the same entity once. /// Retain/Release is part of AERC (Automatic Entity Reference Counting) /// and is used internally to prevent pooling retained entities. /// If you use retain manually you also have to /// release it manually at some point. /// </summary> /// <param name="owner"></param> public void Retain(object owner) { _aerc.Retain(owner); // TODO VD PERFORMANCE // _toStringCache = null; }
/// Retains the entity. An owner can only retain the same entity once. /// Retain/Release is part of AERC (Automatic Entity Reference Counting) /// and is used internally to prevent pooling retained entities. /// If you use retain manually you also have to /// release it manually at some point. public void Retain(object owner) { _aerc.Retain(owner); _toStringCache = null; #if (!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) if (OnEntityRetained != null) { OnEntityRetained(this, owner); } #endif }
/// Retains the entity. An owner can only retain the same entity once. /// Retain/Release is part of AERC (Automatic Entity Reference Counting) /// and is used internally to prevent pooling retained entities. /// If you use retain manually you also have to /// release it manually at some point. public void Retain(object owner) { _aerc.Retain(owner); _toStringCache = null; }