![]() |
TilePlus Version 5
Unity3D Tilemap Extension
|
-—BASE CLASS-— This is used by TpZoneAnimator to provide customization. More...


Public Member Functions | |
| void | OnEnable () |
| OnEnable calls Init if m_InitOnEnable is true. | |
| virtual bool | Init (object? obj=null) |
| Do any required initialization. | |
| virtual bool | Exec (TpZoneAnimator? zoneAnimator) |
| Do something. | |
Public Attributes | |
| bool | m_ActionHandlesSpawnDespawn |
| If true, this action handles Spawning and the TpZoneAnimator tile doesn't spawn. Note that the action will see animator and target == null in the Exec method. | |
| bool | m_InitOnEnable |
| If true, Init is executed in OnEnable. | |
Properties | |
| bool | Initialized [get] |
| Has this instance been initialized? | |
-—BASE CLASS-— This is used by TpZoneAnimator to provide customization.
You don’t want to maintain state of any kind in an AnimatorAction asset’s code unless you use that AnimatorAction in only ONE tile asset. Similarly to other assets, changing serialized values in these assets in Editor-Play mode can cause all sorts of issues.
|
virtual |
Do something.
| zoneAnimator | A ref to the tile that is the caller of this method |
zoneAnimator.target is the prefab game object. Don't use Tilemap.GetInstantiatedObject
If m_ActionHandlesSpawnDespawn then zoneAnimator.PrefabAnimator and zoneAnimator.Target (the spawned GO) will be null on entry. Normally that'd only occur for a Start action.
NOTE that any prefabs spawned here should parented to a Tilemap AND should be added to the ZoneAnimator instance's SpawnedPrefabs list by using zoneAnimator.AddSpawnedGameObject(); If you use the base class' Spawn method (recommended if this prefab is the one you want animated) this is handled automatically.
If no prefabs are spawned in the ZoneAnimator, ensure that SetTarget is used on the ZoneAnimator for at least one animator.
|
virtual |
Do any required initialization.
| void TilePlus.TpAnimatorAction.OnEnable | ( | ) |
OnEnable calls Init if m_InitOnEnable is true.
| bool TilePlus.TpAnimatorAction.m_ActionHandlesSpawnDespawn |
If true, this action handles Spawning and the TpZoneAnimator tile doesn't spawn. Note that the action will see animator and target == null in the Exec method.
| bool TilePlus.TpAnimatorAction.m_InitOnEnable |
If true, Init is executed in OnEnable.
|
get |
Has this instance been initialized?