StandardHierarchyWorldShifter Class

public sealed class StandardHierarchyWorldShifter : WorldShifter

A World Shifter implementation that works in conjuction with a Standard Hierarchy Organizer (as such, it can only be used when you are using a Standard Hiearchy Organizer). For other organizer or when not using a organizer, you will need to implement a custom World Shifter.

This shifter also assumes that the chunks used are Game Objects. If not using Game Objects, you will need to use a custom World Shifter.

Properties

Name Type Description
FireWorldShiftedEventAutomatically bool

Returns false, as we manually fire the World Shifted event

FireWorldShiftingEventAutomatically bool

Returns false, as we manually fire the World Shifting event

Methods

AwakeExtended()

protected sealed override void AwakeExtended()

An implementation of logic that would normally go into Awake, but since that is used by the base class, we put it here instead.


CalculateNumberOfTransformsToBeShifted()

protected override int CalculateNumberOfTransformsToBeShifted()

Uses the Standard Hierarchy Organizer and WhatToShift value to calculate the number of transforms that will be shifted.

Returns

int
The number of transforms that will be shifted.


IsConfiguredToMovePlayerFromActiveGrid(ActiveGrid)

public sealed override bool IsConfiguredToMovePlayerFromActiveGrid(ActiveGrid activeGrid)

Executes a query to determine if the Shifter has been configured to move the Player associated with the activeGrid. This is used by the Active Grid in certain situations to avoid double movements. Returns true only if Move Players is enabled and the Active Grid is included in the Active Grids With Players array.

Parameters

Name Type Description
activeGrid ActiveGrid

The active grid with the Player.

Returns

bool
True if the World Shifter has been configured to move the player, false otherwise.


OnDestroyExtended()

protected virtual void OnDestroyExtended()

An implementation of logic that would normally go into OnDestroy, but since that is used by the base class, we put it here instead.


ShiftWorld()

public sealed override IEnumerator<YieldInstruction> ShiftWorld()

Implementation of the Shift World method, which shifts the transforms in the hierarchy (organized via a Standard Hierarchy Organizer).

Returns

IEnumerator<YieldInstruction>
An IEnumerator<YieldInstruction> that can be iterated over or used as a coroutine. See the YieldInstruction page for more info.