Search Results for

    Show / Hide Table of Contents

    Class KaijuBehaviour

    Base extended behaviour providing convenient helpers methods, mainly in relation to position and orientation.

    Inheritance
    System.Object
    KaijuBehaviour
    KaijuActuator
    Floor
    Pickup
    SpawnPoint
    EnergyPickup
    MicrobeManager
    KaijuAgent
    KaijuAgentsManager
    KaijuController
    KaijuGlobalController
    KaijuSensor
    Namespace: KaijuSolutions.Agents
    Syntax
    public abstract class KaijuBehaviour : MonoBehaviour

    Properties

    ActiveInHierarchy

    The active state of the GameObject in the Scene hierarchy. True if active, false if inactive.

    Declaration
    public bool ActiveInHierarchy { get; }
    Property Value
    Type Description
    System.Boolean

    ActiveSelf

    The local active state of the GameObject. True if active, false if inactive.

    Declaration
    public bool ActiveSelf { get; }
    Property Value
    Type Description
    System.Boolean

    Backwards

    A normalized vector representing the negative blue axis of thetransformin world space.

    Declaration
    public Vector3 Backwards { get; }
    Property Value
    Type Description
    Vector3

    ChildCount

    The number of children this has.

    Declaration
    public int ChildCount { get; }
    Property Value
    Type Description
    System.Int32

    ComponentCount

    The number of components on the GameObject as an integer value.

    Declaration
    public int ComponentCount { get; }
    Property Value
    Type Description
    System.Int32

    Down

    A normalized vector representing the negative green axis of thetransformin world space.

    Declaration
    public Vector3 Down { get; }
    Property Value
    Type Description
    Vector3

    Forward

    A normalized vector representing the blue axis of thetransformin world space along the X and Z axes.

    Declaration
    public Vector2 Forward { get; }
    Property Value
    Type Description
    Vector2

    Forward3

    A normalized vector representing the blue axis of thetransformin world space.

    Declaration
    public Vector3 Forward3 { get; }
    Property Value
    Type Description
    Vector3

    GlobalScale

    The global or lossy scale.

    Declaration
    public Vector3 GlobalScale { get; }
    Property Value
    Type Description
    Vector3

    GlobalScaleX

    The X global or lossy scale.

    Declaration
    public float GlobalScaleX { get; }
    Property Value
    Type Description
    System.Single

    GlobalScaleY

    The Y global or lossy scale.

    Declaration
    public float GlobalScaleY { get; }
    Property Value
    Type Description
    System.Single

    GlobalScaleZ

    The Z global or lossy scale.

    Declaration
    public float GlobalScaleZ { get; }
    Property Value
    Type Description
    System.Single

    HasChanged

    Has thetransformchanged since the last time the flag was set to 'false'?

    Declaration
    public bool HasChanged { get; }
    Property Value
    Type Description
    System.Boolean

    HierarchyCapacity

    Thetransformcapacity of the transform's hierarchy data structure.

    Declaration
    public int HierarchyCapacity { get; set; }
    Property Value
    Type Description
    System.Int32

    HierarchyCount

    The number of transforms in the transform's hierarchy data structure.

    Declaration
    public int HierarchyCount { get; }
    Property Value
    Type Description
    System.Int32

    IsStatic

    Whether there are any Static Editor Flags set for the GameObject.

    Declaration
    public bool IsStatic { get; set; }
    Property Value
    Type Description
    System.Boolean

    Layer

    Integer identifying the layer the GameObject is assigned to.

    Declaration
    public int Layer { get; set; }
    Property Value
    Type Description
    System.Int32

    Left

    A normalized vector representing the negative red axis of thetransformin world space.

    Declaration
    public Vector3 Left { get; }
    Property Value
    Type Description
    Vector3

    LocalOrientation

    The main local orientation around the Y axis. The difference between this and LocalOrientationY is that setting this will snap the X and Y angles to zero while LocalOrientationY will not change them.

    Declaration
    public float LocalOrientation { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationAngles

    Get the local orientation of this in angles.

    Declaration
    public Vector3 LocalOrientationAngles { get; set; }
    Property Value
    Type Description
    Vector3

    LocalOrientationQuaternion

    Get the local orientation of this as a quaternion. In most instances, it is easier to work with LocalOrientationAngles.

    Declaration
    public Quaternion LocalOrientationQuaternion { get; set; }
    Property Value
    Type Description
    Quaternion

    LocalOrientationQuaternionW

    The local W value of the local orientation quaternion. If you are looking to get or The angle, you may be looking for LocalOrientationX, LocalOrientationY, or LocalOrientationZ.

    Declaration
    public float LocalOrientationQuaternionW { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationQuaternionX

    The local X value of the local orientation quaternion. If you are looking to get or The angle, you may be looking for LocalOrientationX.

    Declaration
    public float LocalOrientationQuaternionX { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationQuaternionY

    The local Y value of the local orientation quaternion. If you are looking to get or The angle, you may be looking for LocalOrientationY.

    Declaration
    public float LocalOrientationQuaternionY { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationQuaternionZ

    The local Z value of the local orientation quaternion. If you are looking to get or The angle, you may be looking for LocalOrientationZ.

    Declaration
    public float LocalOrientationQuaternionZ { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationX

    The local X orientation of this.

    Declaration
    public float LocalOrientationX { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationY

    The local Y orientation of this. The difference between this and LocalOrientation is that LocalOrientation will snap the X and Z angles to zero while this will keep them the same.

    Declaration
    public float LocalOrientationY { get; set; }
    Property Value
    Type Description
    System.Single

    LocalOrientationZ

    The local Z orientation of this.

    Declaration
    public float LocalOrientationZ { get; set; }
    Property Value
    Type Description
    System.Single

    LocalPosition

    The position vector along the main XZ axis.

    Declaration
    public Vector2 LocalPosition { get; set; }
    Property Value
    Type Description
    Vector2

    LocalPosition3

    The position along all axes.

    Declaration
    public Vector3 LocalPosition3 { get; set; }
    Property Value
    Type Description
    Vector3

    LocalScale

    The local scale.

    Declaration
    public Vector3 LocalScale { get; set; }
    Property Value
    Type Description
    Vector3

    LocalScaleX

    The X local scale.

    Declaration
    public float LocalScaleX { get; set; }
    Property Value
    Type Description
    System.Single

    LocalScaleY

    The Y local scale.

    Declaration
    public float LocalScaleY { get; set; }
    Property Value
    Type Description
    System.Single

    LocalScaleZ

    The Z local scale.

    Declaration
    public float LocalScaleZ { get; set; }
    Property Value
    Type Description
    System.Single

    LocalToWorld

    Matrix that transforms a point from local space into world space.

    Declaration
    public Matrix4x4 LocalToWorld { get; }
    Property Value
    Type Description
    Matrix4x4

    LocalX

    The local X position.

    Declaration
    public float LocalX { get; set; }
    Property Value
    Type Description
    System.Single

    LocalY

    The local Y position.

    Declaration
    public float LocalY { get; set; }
    Property Value
    Type Description
    System.Single

    LocalZ

    The local Y position.

    Declaration
    public float LocalZ { get; set; }
    Property Value
    Type Description
    System.Single

    Orientation

    The main orientation around the Y axis. The difference between this and OrientationY is that setting this will snap the X and Y angles to zero while OrientationY will not change them.

    Declaration
    public float Orientation { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationAngles

    Get the orientation of this in angles.

    Declaration
    public Vector3 OrientationAngles { get; set; }
    Property Value
    Type Description
    Vector3

    OrientationQuaternion

    Get the orientation of this as a quaternion. In most instances, it is easier to work with OrientationAngles.

    Declaration
    public Quaternion OrientationQuaternion { get; set; }
    Property Value
    Type Description
    Quaternion

    OrientationQuaternionW

    The local W value of the orientation quaternion. If you are looking to get or The angle, you may be looking for OrientationX, OrientationY, or OrientationZ.

    Declaration
    public float OrientationQuaternionW { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationQuaternionX

    The local X value of the orientation quaternion. If you are looking to get or The angle, you may be looking for OrientationX.

    Declaration
    public float OrientationQuaternionX { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationQuaternionY

    The local Y value of the orientation quaternion. If you are looking to get or The angle, you may be looking for OrientationY.

    Declaration
    public float OrientationQuaternionY { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationQuaternionZ

    The local Z value of the orientation quaternion. If you are looking to get or The angle, you may be looking for OrientationZ.

    Declaration
    public float OrientationQuaternionZ { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationX

    The X orientation of this.

    Declaration
    public float OrientationX { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationY

    The Y orientation of this. The difference between this and Orientation is that Orientation will snap the X and Z angles to zero while this will keep them the same.

    Declaration
    public float OrientationY { get; set; }
    Property Value
    Type Description
    System.Single

    OrientationZ

    The Z orientation of this.

    Declaration
    public float OrientationZ { get; set; }
    Property Value
    Type Description
    System.Single

    Parent

    The parent of this.

    Declaration
    public Transform Parent { get; }
    Property Value
    Type Description
    Transform

    Position

    The position vector along the main XZ axis.

    Declaration
    public Vector2 Position { get; set; }
    Property Value
    Type Description
    Vector2

    Position3

    The position along all axes.

    Declaration
    public Vector3 Position3 { get; set; }
    Property Value
    Type Description
    Vector3

    Right

    A normalized vector representing the red axis of thetransformin world space.

    Declaration
    public Vector3 Right { get; }
    Property Value
    Type Description
    Vector3

    Root

    The topmost parent of this.

    Declaration
    public Transform Root { get; }
    Property Value
    Type Description
    Transform

    Scene

    The Scene that contains the GameObject.

    Declaration
    public Scene Scene { get; }
    Property Value
    Type Description
    Scene

    Up

    A normalized vector representing the green axis of thetransformin world space.

    Declaration
    public Vector3 Up { get; }
    Property Value
    Type Description
    Vector3

    WorldToLocal

    Matrix that transforms a point from world space into local space.

    Declaration
    public Matrix4x4 WorldToLocal { get; }
    Property Value
    Type Description
    Matrix4x4

    X

    The X position.

    Declaration
    public float X { get; set; }
    Property Value
    Type Description
    System.Single

    Y

    The Y position.

    Declaration
    public float Y { get; set; }
    Property Value
    Type Description
    System.Single

    Z

    The Z position.

    Declaration
    public float Z { get; set; }
    Property Value
    Type Description
    System.Single

    Events

    OnPreSetOrientation

    Callback for before the orientation has been set.

    Declaration
    public event KaijuAction OnPreSetOrientation
    Event Type
    Type Description
    KaijuAction

    OnPreSetOrientationGlobal

    Global callback for before the orientation has been set.

    Declaration
    public static event KaijuBehaviourAction OnPreSetOrientationGlobal
    Event Type
    Type Description
    KaijuBehaviourAction

    OnPreSetPosition

    Callback for before the position has been set.

    Declaration
    public event KaijuAction OnPreSetPosition
    Event Type
    Type Description
    KaijuAction

    OnPreSetPositionGlobal

    Global callback for before the position has been set.

    Declaration
    public static event KaijuBehaviourAction OnPreSetPositionGlobal
    Event Type
    Type Description
    KaijuBehaviourAction

    OnPreSetScale

    Callback for before the scale has been set.

    Declaration
    public event KaijuAction OnPreSetScale
    Event Type
    Type Description
    KaijuAction

    OnPreSetScaleGlobal

    Global callback for before the scale has been set.

    Declaration
    public static event KaijuBehaviourAction OnPreSetScaleGlobal
    Event Type
    Type Description
    KaijuBehaviourAction

    OnSetOrientation

    Callback for when the orientation has been set.

    Declaration
    public event KaijuAction OnSetOrientation
    Event Type
    Type Description
    KaijuAction

    OnSetOrientationGlobal

    Global callback for when the orientation has been set.

    Declaration
    public static event KaijuBehaviourAction OnSetOrientationGlobal
    Event Type
    Type Description
    KaijuBehaviourAction

    OnSetPosition

    Callback for when the position has been set.

    Declaration
    public event KaijuAction OnSetPosition
    Event Type
    Type Description
    KaijuAction

    OnSetPositionGlobal

    Global callback for when the position has been set.

    Declaration
    public static event KaijuBehaviourAction OnSetPositionGlobal
    Event Type
    Type Description
    KaijuBehaviourAction

    OnSetScale

    Callback for when the scale has been set.

    Declaration
    public event KaijuAction OnSetScale
    Event Type
    Type Description
    KaijuAction

    OnSetScaleGlobal

    Global callback for when the scale has been set.

    Declaration
    public static event KaijuBehaviourAction OnSetScaleGlobal
    Event Type
    Type Description
    KaijuBehaviourAction

    Operators

    Implicit(GameObject to KaijuBehaviour)

    Implicit conversion from a GameObject.

    Declaration
    public static implicit operator KaijuBehaviour(GameObject o)
    Parameters
    Type Name Description
    GameObject o

    The GameObject.

    Returns
    Type Description
    KaijuBehaviour

    The behaviour attached to the GameObject if there was one.

    Implicit(KaijuBehaviour to GameObject)

    Implicit conversion to a GameObject.

    Declaration
    public static implicit operator GameObject(KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    GameObject

    The GameObject of the behaviour.

    Implicit(KaijuBehaviour to Quaternion)

    Implicit conversion to a Quaternion from the OrientationQuaternion.

    Declaration
    public static implicit operator Quaternion(KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    Quaternion

    The KaijuAgent's Position.

    Implicit(KaijuBehaviour to Boolean)

    Implicit conversion to a Boolean if the behaviour is active.

    Declaration
    public static implicit operator bool (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Boolean

    If the behaviour is active.

    Implicit(KaijuBehaviour to Double)

    Implicit conversion to a double from the Orientation.

    Declaration
    public static implicit operator double (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Double

    The KaijuAgent's Orientation.

    Implicit(KaijuBehaviour to Nullable<Quaternion>)

    Implicit conversion to a nullable Quaternion from the OrientationQuaternion.

    Declaration
    public static implicit operator Quaternion? (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Nullable<Quaternion>

    The KaijuAgent's Position3.

    Implicit(KaijuBehaviour to Nullable<Boolean>)

    Implicit conversion to a nullable Boolean if the behaviour is active.

    Declaration
    public static implicit operator bool? (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Nullable<System.Boolean>

    If the behaviour is active.

    Implicit(KaijuBehaviour to Nullable<Double>)

    Implicit conversion to a nullable double from the Orientation.

    Declaration
    public static implicit operator double? (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Nullable<System.Double>

    The KaijuAgent's Orientation.

    Implicit(KaijuBehaviour to Nullable<Single>)

    Implicit conversion to a nullable float from the Orientation.

    Declaration
    public static implicit operator float? (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Nullable<System.Single>

    The KaijuAgent's Orientation.

    Implicit(KaijuBehaviour to Nullable<Vector2>)

    Implicit conversion to a nullable Vector2 from the Position.

    Declaration
    public static implicit operator Vector2? (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Nullable<Vector2>

    The KaijuAgent's Position.

    Implicit(KaijuBehaviour to Nullable<Vector3>)

    Implicit conversion to a nullable Vector3 from the Position3.

    Declaration
    public static implicit operator Vector3? (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Nullable<Vector3>

    The KaijuAgent's Position3.

    Implicit(KaijuBehaviour to Single)

    Implicit conversion to a float from the Orientation.

    Declaration
    public static implicit operator float (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.Single

    The KaijuAgent's Orientation.

    Implicit(KaijuBehaviour to String)

    Implicit conversion to a string.

    Declaration
    public static implicit operator string (KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    System.String

    The string from the KaijuSolutions.Agents.KaijuBehaviour.ToString method.

    Implicit(KaijuBehaviour to Transform)

    Implicit conversion to a transform.

    Declaration
    public static implicit operator Transform(KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    Transform

    The transform of the behaviour.

    Implicit(KaijuBehaviour to Vector2)

    Implicit conversion to a Vector2 from the Position.

    Declaration
    public static implicit operator Vector2(KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    Vector2

    The KaijuAgent's Position.

    Implicit(KaijuBehaviour to Vector3)

    Implicit conversion to a Vector3 from the Position3.

    Declaration
    public static implicit operator Vector3(KaijuBehaviour b)
    Parameters
    Type Name Description
    KaijuBehaviour b

    The behaviour.

    Returns
    Type Description
    Vector3

    The KaijuAgent's Position.

    Implicit(Transform to KaijuBehaviour)

    Implicit conversion from a transform.

    Declaration
    public static implicit operator KaijuBehaviour(Transform t)
    Parameters
    Type Name Description
    Transform t

    The transform.

    Returns
    Type Description
    KaijuBehaviour

    The behaviour attached to the transform if there was one.

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