holoride
Search Results for

    Show / Hide Table of Contents

    Class SpawnerNode.SpawnerWorker<T>

    The base class to spawn objects.

    Inheritance
    object
    PipelineWorkerBase
    SpawnerWorker
    SpawnerNode.SpawnerWorker<T>
    PermittedAreaSpawnerNode.PermittedAreaSpawnerWorker<T>
    Implements
    IPipelineWorker
    IShiftParent
    Inherited Members
    SpawnerWorker.CellSize
    SpawnerWorker.Extents
    SpawnerWorker.IsUnconstrained
    SpawnerWorker.OnGameObjectsCreated
    SpawnerWorker.QuantityInitEstimation
    SpawnerWorker.MayUpdateMovingGrid
    SpawnerWorker.CallInit()
    SpawnerWorker.Dispose()
    SpawnerWorker.DiscreteRadius
    SpawnerWorker.Bounds
    SpawnerWorker.CellKeyToBounds(Vector2Int)
    SpawnerWorker.SpawnCell(Vector2Int, IList<GameObject>, CancellationToken)
    SpawnerWorker.MoveSpawnPosition(GlobalPosition, CancellationToken)
    SpawnerWorker.EvaluateSpawnCandidate(int, GlobalPosition, CancellationToken)
    SpawnerWorker.ComputeCellKeyFromPosition(GlobalPosition)
    SpawnerWorker.DestroyAllCells()
    PipelineWorkerBase.GenerationSettings
    PipelineWorkerBase.GenerationState
    PipelineWorkerBase.CurrentGenerationContext
    PipelineWorkerBase.Pipeline
    PipelineWorkerBase.IsGatheringResources
    PipelineWorkerBase.IsProcessing
    PipelineWorkerBase.Inputs
    PipelineWorkerBase.MissingMandatoryInputs
    PipelineWorkerBase.AddMissingMandatoryInput(string)
    PipelineWorkerBase.HasMissingMandatoryInputInHierarchy
    PipelineWorkerBase.AddInput(string, IPipelineWorker)
    PipelineWorkerBase.GetInput(string)
    PipelineWorkerBase.GetInput<T>(string)
    PipelineWorkerBase.InitResources()
    PipelineWorkerBase.CallInitResources()
    PipelineWorkerBase.Init()
    PipelineWorkerBase.GatherResourcesAsync(GenerationContext, IProgress<float>, CancellationToken)
    PipelineWorkerBase.CallGatherResourcesAsync(GenerationContext, IProgress<float>, CancellationToken)
    PipelineWorkerBase.ProcessAsync(GenerationContext, IProgress<float>, CancellationToken)
    PipelineWorkerBase.CallProcessAsync(GenerationContext, IProgress<float>, CancellationToken)
    PipelineWorkerBase.CleanUp()
    PipelineWorkerBase.CallCleanUp()
    Namespace: Holoride.ElasticSDK.Graph.Spawners
    Assembly: Holoride.ElasticSDK.Runtime.dll
    Syntax
    protected abstract class SpawnerNode.SpawnerWorker<T> : SpawnerWorker, IPipelineWorker, IShiftParent where T : SpawnerNode
    Type Parameters
    Name Description
    T

    The generating node type deriving from Spawner.

    Constructors

    SpawnerWorker(T, bool)

    Instantiates the worker.

    Declaration
    protected SpawnerWorker(T node, bool isUnconstrained)
    Parameters
    Type Name Description
    T node

    A back reference to the node that created this worker.

    bool isUnconstrained

    Whether this spawner uses unconstrained extents.

    SpawnerWorker(T)

    Instantiates the worker.

    Declaration
    protected SpawnerWorker(T node)
    Parameters
    Type Name Description
    T node

    A back reference to the node that created this worker.

    Fields

    Node

    A reference to the node that generated this worker in order to access its serialized data.

    Declaration
    protected readonly T Node
    Field Value
    Type Description
    T

    Properties

    ShiftParent

    Gets or sets the GameObject that's parent to spawned GameObjects.

    Declaration
    public GameObject ShiftParent { get; set; }
    Property Value
    Type Description
    GameObject

    Methods

    DestroyCell(IEnumerable<GameObject>)

    Destroys all objects within a cell by destroying them. Override this function to treat disappearing objects differently, e.g. to return them to an object pool.

    Declaration
    public override void DestroyCell(IEnumerable<GameObject> gameObjects)
    Parameters
    Type Name Description
    IEnumerable<GameObject> gameObjects

    The game objects to destroy.

    Overrides
    SpawnerWorker.DestroyCell(IEnumerable<GameObject>)

    InitializeInstance(GameObject, SpawnCandidate, CancellationToken)

    Perform early initialization of a spawned instance.

    This allows configuration before the instances Awake/OnEnable/RetrievedFromPool is called.

    Declaration
    protected virtual UniTask InitializeInstance(GameObject instance, SpawnCandidate candidate, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    GameObject instance

    The instance to initialize.

    SpawnCandidate candidate

    The spawn candidate the instance was created for.

    CancellationToken cancellationToken

    Token to cancel the async UniTask operation.

    Returns
    Type Description
    Cysharp.Threading.Tasks.UniTask

    InstantiateAndInject(GameObject, Vector3, Quaternion, SpawnCandidate, float, CancellationToken)

    Utility method to create an instance from a prefab that gets filled with the dynamic port data from the node graph (if it requested any).

    Declaration
    protected UniTask<GameObject> InstantiateAndInject(GameObject prefab, Vector3 position, Quaternion rotation, SpawnCandidate candidate, float scale = 1, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    GameObject prefab

    The prefab to be instantiated.

    Vector3 position

    The position of the instantiated prefab.

    Quaternion rotation

    The rotation of the instantiated prefab.

    SpawnCandidate candidate

    The spawn candidate the instance was created for.

    float scale

    The optional scale of the prefab.

    CancellationToken cancellationToken

    Token to cancel the async UniTask operation.

    Returns
    Type Description
    Cysharp.Threading.Tasks.UniTask<T><GameObject>

    The created instance.

    Implements

    IPipelineWorker
    IShiftParent
    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint