Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsFlatten

    Extension methods to flatten objects down to their 2D representation as a Vector2 from the X and Z axes.

    Inheritance
    System.Object
    KaijuAgentsFlatten
    Namespace: KaijuSolutions.Agents.Extensions
    Syntax
    public static class KaijuAgentsFlatten

    Methods

    Flatten(Component)

    Flatten a component down to the X and Z axes positions.

    Declaration
    public static Vector2 Flatten(this Component component)
    Parameters
    Type Name Description
    Component component

    The vector to flatten.

    Returns
    Type Description
    Vector2

    The component flattened down to the X and Z axes positions.

    Flatten(GameObject)

    Flatten a GameObject down to the X and Z axes positions.

    Declaration
    public static Vector2 Flatten(this GameObject gameObject)
    Parameters
    Type Name Description
    GameObject gameObject

    The vector to flatten.

    Returns
    Type Description
    Vector2

    The GameObject flattened down to the X and Z axes positions.

    Flatten(Transform)

    Flatten a transform down to the X and Z axes positions.

    Declaration
    public static Vector2 Flatten(this Transform transform)
    Parameters
    Type Name Description
    Transform transform

    The vector to flatten.

    Returns
    Type Description
    Vector2

    The transform flattened down to the X and Z axes positions.

    Flatten(Vector3)

    Flatten an XYZ vector down to the X and Z axes.

    Declaration
    public static Vector2 Flatten(this Vector3 vector)
    Parameters
    Type Name Description
    Vector3 vector

    The vector to flatten.

    Returns
    Type Description
    Vector2

    The XYZ vector flattened down to the X and Z axes.

    In This Article
    Back to top MIT License © 2026 Kaiju Solutions Inc.