Show / Hide Table of Contents

Class ArrayLookup

Extension methods for looking up elements in 3D C# arrays using Unity int-vectors.

Inheritance
System.Object
ArrayLookup
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CarbideFunction.Wildtile
Syntax
public static class ArrayLookup

Methods

Contains<ArrayContents>(ArrayContents[,,], Vector3Int)

Test if a coordinate is within an array's dimensions.

Note this does not check if there is an instance of coordinates in sourceArray, like C# Contains methods

Declaration
public static bool Contains<ArrayContents>(this ArrayContents[,, ] sourceArray, Vector3Int coordinates)
Parameters
Type Name Description
ArrayContents[,,] sourceArray
Vector3Int coordinates
Returns
Type Description
System.Boolean
Type Parameters
Name Description
ArrayContents

Lookup<ArrayContents>(ArrayContents[,,], Vector3Int)

Find an element in a 3D array by Unity Vector3Int coordinates.

Declaration
public static ref ArrayContents Lookup<ArrayContents>(this ArrayContents[,, ] sourceArray, Vector3Int coordinates)
Parameters
Type Name Description
ArrayContents[,,] sourceArray
Vector3Int coordinates
Returns
Type Description
ArrayContents
Type Parameters
Name Description
ArrayContents
In This Article
Generated by DocFX Version: 4.1.0 - click to show/hide other versions