MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / AddReference

Method AddReference

Source/Editor/Content/Items/ContentItem.cs:526–538  ·  view source on GitHub ↗

Adds the reference to the item. The object.

(IContentItemOwner obj)

Source from the content-addressed store, hash-verified

524 /// </summary>
525 /// <param name="obj">The object.</param>
526 public void AddReference(IContentItemOwner obj)
527 {
528 Assert.IsNotNull(obj);
529 Assert.IsFalse(_references.Contains(obj));
530
531 _references.Add(obj);
532
533 // Check if need to generate preview
534 if (_references.Count == 1 && !_thumbnail.IsValid)
535 {
536 RequestThumbnail();
537 }
538 }
539
540 /// <summary>
541 /// Removes the reference from the item.

Callers 7

AddRequestMethod · 0.45
ContentItemTreeNodeMethod · 0.45
ShowItemsMethod · 0.45
ContentItemViewMethod · 0.45
VideoWindowMethod · 0.45
AssetEditorWindowMethod · 0.45
ContentSearchItemMethod · 0.45

Calls 4

IsNotNullMethod · 0.80
IsFalseMethod · 0.45
ContainsMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected