Table of Contents

Class ResourceEntity

Namespace
ReFuel.Resources
Assembly
ReFuel.dll
public abstract class ResourceEntity : Entity, IEnumerable<EcsNode>, IEnumerable, IResourceInfo, IArc, IDisposable, IInitializer, IInitializerBase
Inheritance
ResourceEntity
Implements
Derived
Inherited Members

Properties

Class

The class of this resource.

public abstract ResourceClass Class { get; }

Property Value

ResourceClass

FailReason

A string that tells why the resource loader failed, if not null.

public ResourceLoaderFailReason? FailReason { get; protected set; }

Property Value

ResourceLoaderFailReason

IsFailed

True if the resource loader has failed.

public bool IsFailed { get; protected set; }

Property Value

bool

IsReady

True when the resource is ready.

public bool IsReady { get; protected set; }

Property Value

bool

KeepAlive

Any object marked Keep Alive is never collected.

public bool KeepAlive { get; set; }

Property Value

bool

NotReadyException

protected static Exception NotReadyException { get; }

Property Value

Exception

References

Number of references to this object.

public int References { get; }

Property Value

int

SizeInBytes

Approximate size of the object in bytes.

public long SizeInBytes { get; protected set; }

Property Value

long

Remarks

Because C# doesn't provide a way for us to measure the size of reference trees, we have to make do with hand written approximations of the real memory usage. This memory usage counter is used to determine which cached resources are to be evicted.

Methods

DecrementReference()

Decrement the number of references to this object.

public void DecrementReference()

IncrementReference()

Increment the number of references to this object.

public void IncrementReference()

Initialize()

public virtual void Initialize()