Documentation

Unity Engine

Download Unity

Unity Engine

ReferenceCount

The number of load requests that hold the file.
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Property
  • Namespace: Unity.Loading
  • Assembly: UnityEngine.ContentLoadModule
public int ReferenceCount { get; }

Remarks

Each Loadable<T> that is loaded and not released holds the file of its object, and Unity holds the file of each root asset while the content directory is registered. Files that depend on this file are not counted. ContentLoadState.Dependencies lists the dependencies of each file. A file whose count stays above its ContentDirectoryLoadInfo.RootAssetReferences entry after the content that loaded it is gone is held by a Loadable<T> that was not released.