Search Results for

    Show / Hide Table of Contents

    Class PrefabSpawningController

    Handles the initial spawning and positioning as well as the repositioning of the training assembly.

    Inheritance
    object
    PrefabSpawningController
    Namespace: Others
    Assembly: .dll
    Syntax
    public class PrefabSpawningController : MonoBehaviour

    Fields

    | Edit this page View Source

    instantiatedPrefab

    Reference to the spawned training assembly.

    Declaration
    public static GameObject instantiatedPrefab
    Field Value
    Type Description
    GameObject

    Gets created on runtime.

    | Edit this page View Source

    objectWasSpawned

    Is the prefab spawned?

    Declaration
    public bool objectWasSpawned
    Field Value
    Type Description
    bool

    True if spawned.

    | Edit this page View Source

    placementPoseIsValid

    Is the attempted placement pose valid?

    Declaration
    public bool placementPoseIsValid
    Field Value
    Type Description
    bool

    True if valid.

    Methods

    | Edit this page View Source

    GetSpawnedObject()

    Returns the instantiated prefab.

    Declaration
    public GameObject GetSpawnedObject()
    Returns
    Type Description
    GameObject

    The instantiated prefab.

    | Edit this page View Source

    Reposition()

    Restarts the positioning process to make reposition of the prefab possible.

    Declaration
    public void Reposition()

    Events

    | Edit this page View Source

    RepositionPrefab

    Event that is triggered after repositioning of the training assembly.

    Declaration
    public static event Action RepositionPrefab
    Event Type
    Type Description
    Action
    | Edit this page View Source

    prefabSpawned

    Event that is triggered after the assembly is spawned.

    Declaration
    public static event Action prefabSpawned
    Event Type
    Type Description
    Action
    • Edit this page
    • View Source
    In this article
    Back to top TrainAR Documentation