IResource
Summary
Definition
Namespace: SDT4.Managed.Core.Asset
Assembly: SDT4.Managed.Core.dll
interface IResource
Implements:
IDisposable
Fields
| Name | Type | Description |
|---|---|---|
Properties
| Name | Type | Description |
|---|---|---|
public get; Type |
AssetType | |
public get; Asset |
AssetID | |
public get; ResourceSize |
Int64 | Size of this resources in both VRAM and RAM in bytes. |
public get; ControlBlock |
IntPtr | Immutable native pointer. This will never change as long as the resource stays alive. |
public get; ResourceBlock |
IntPtr | Mutable native pointer. This should not change in a standalone build, however during editor states, |
| this may change upon asset modifications or reloads. | ||
| Prefer using ControlBlock if you must use a native reference. | ||
public get; References |
Int32 | Returns the number of references to this asset. This cannot be manually counted, as this is tightly managed |
| by the native engine, and the C# script runtime. References are tracked as follows: | ||
|
- Asset dependencies hold strong references (e.g. Materials holding references to Textures)
- IResource references within C#. Note in C#, the reference counting is managed by the garbage collector,
meaning that resources held in C# may be kept alive longer than usual.
|