Table of Contents

Class AssetRef

Namespace
NArk.Core.Assets
Assembly
NArk.Core.dll

Reference to an asset, either by full AssetId or by group index within a Packet. Binary layout: ByID: [0x01][34B AssetId] ByGroup: [0x02][2B groupIndex LE]

public class AssetRef
Inheritance
AssetRef
Inherited Members

Properties

AssetId

public AssetId? AssetId { get; }

Property Value

AssetId

GroupIndex

public ushort? GroupIndex { get; }

Property Value

ushort?

Type

public AssetRefType Type { get; }

Property Value

AssetRefType

Methods

FromBytes(byte[])

public static AssetRef FromBytes(byte[] buf)

Parameters

buf byte[]

Returns

AssetRef

FromGroupIndex(ushort)

public static AssetRef FromGroupIndex(ushort groupIndex)

Parameters

groupIndex ushort

Returns

AssetRef

FromId(AssetId)

public static AssetRef FromId(AssetId assetId)

Parameters

assetId AssetId

Returns

AssetRef

FromReader(BufferReader)

public static AssetRef FromReader(BufferReader reader)

Parameters

reader BufferReader

Returns

AssetRef

Serialize()

public byte[] Serialize()

Returns

byte[]

SerializeTo(BufferWriter)

public void SerializeTo(BufferWriter writer)

Parameters

writer BufferWriter

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.