private void removePreview() { if (_entryVolume == null) { return; } Destroy(_entryVolume.Base.gameObject); _entryVolume = null; }
//TODO Not very elegant! Other solution needed private void findEntryVolume() { if (_entryVolume == null) { _entryVolume = GetComponentInParent <EntryVolume>(); } if (_entryVolume == null) { _entryVolume = GetComponent <EntryVolume>(); } if (_entryVolume == null) { throw new MissingComponentException($"There has to be an instance of the {nameof(EntryVolume)} component on the object or its parents"); } }
private void createPreview() { if (_entryVolume != null) { throw new InvalidOperationException(); } if (_editPanel.Entry == null) { return; } EntryVolume entryContent = _volumeFactory.Create(_editPanel.Entry.Volume); entryContent.Base.SetParent(_hook, false); entryContent.Base.localScale = Vector3.one; entryContent.Expanded = _extended; _entryVolume = entryContent; }
protected virtual void Reset() { _entryVolume = GetComponentInParent <EntryVolume>(); _layoutElement = GetComponent <TextLayoutElement>(); }
protected virtual void Reset() { _content = GetComponent <EntryVolume>(); }