Struct NetworkHash128
A 128 bit number used to represent assets in a networking context.
Syntax
[Serializable]
[Obsolete("The high level API classes are deprecated and will be removed in the future.")]
public struct NetworkHash128
Fields
i0
Declaration
Field Value
i1
Declaration
Field Value
i10
Declaration
Field Value
i11
Declaration
Field Value
i12
Declaration
Field Value
i13
Declaration
Field Value
i14
Declaration
Field Value
i15
Declaration
Field Value
i2
Declaration
Field Value
i3
Declaration
Field Value
i4
Declaration
Field Value
i5
Declaration
Field Value
i6
Declaration
Field Value
i7
Declaration
Field Value
i8
Declaration
Field Value
i9
Declaration
Field Value
Methods
IsValid()
A valid NetworkHash has a non-zero value.
Declaration
Returns
Type |
Description |
Boolean |
True if the value is non-zero.
|
Parse(String)
This parses the string representation of a NetworkHash into a binary object.
using UnityEngine;
using UnityEngine.Networking;
class HashTest : MonoBehaviour
{
const string assetString = "0176acd452adc180";
NetworkHash128 assetId = NetworkHash128.Parse(assetString);
void Start()
{
Debug.Log("asset:" + assetId);
}
}
Declaration
public static NetworkHash128 Parse(string text)
Parameters
Type |
Name |
Description |
String |
text |
A hex string to parse.
|
Returns
Reset()
Resets the value of a NetworkHash to zero (invalid).
Declaration
ToString()
Returns a string representation of a NetworkHash object.
Declaration
public override string ToString()
Returns
Type |
Description |
String |
A hex asset string.
|
Overrides