UnityEngine.Networking.NetworkHash128.IsValid C# (CSharp) Method

IsValid() public method

A valid NetworkHash has a non-zero value.

public IsValid ( ) : bool
return bool
        public bool IsValid()
        {
            return ((((((((((((((((this.i0 | this.i1) | this.i2) | this.i3) | this.i4) | this.i5) | this.i6) | this.i7) | this.i8) | this.i9) | this.i10) | this.i11) | this.i12) | this.i13) | this.i14) | this.i15) != 0);
        }

Usage Example

コード例 #1
0
 static internal bool GetPrefab(NetworkHash128 assetId, out GameObject prefab)
 {
     prefab = null;
     if (assetId.IsValid() && guidToPrefab.ContainsKey(assetId) && guidToPrefab[assetId] != null)
     {
         prefab = guidToPrefab[assetId];
         return(true);
     }
     return(false);
 }
All Usage Examples Of UnityEngine.Networking.NetworkHash128::IsValid