示例#1
0
        private void ForceUpdateContainer(SerializedProperty property)
        {
            var text = property.objectReferenceValue as TextAsset;

            _text      = text;
            _container = text == null ? null : new ContainerEditorInfo(text, Event.current.alt);

            _color = Color.white;
            if (_container == null)
            {
                _infoLabel = notSelectedLabel;
            }
            else if (!_container.IsValid)
            {
                _color     = Color.red;
                _infoLabel = invalidLabel;
            }
            else
            {
                string entitiesCount = _container.EntriesCount.ToString();
                _infoLabel = new GUIContent(entitiesCount, $"Entities: {entitiesCount}, size: {ContainerEditorView.Size(_container.Size)} bytes");
            }
        }