Skip to main content

FadeInOutNetworkEntity

A class in Root.Township, the global namespace.

Fader for a network entity: when the scene destroys the entity (not on chunk unload), it spawns the fade-out effect for its meshes. Client only; does nothing on a headless server.

Constructors​

MemberWhat it is
FadeInOutNetworkEntity()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private NetworkEntity entityBacking field for Entity, set from the same GameObject.

Properties​

MemberWhat it is
NetworkEntity Entity { get; }The NetworkEntity on the same GameObject.

Methods​

MemberWhat it is
protected override void Awake()Client: copies the fade material and hooks the entity's DestroyedByScene event to FadeOut.
1 private and internal method
MemberWhat it is
private void FadeOut(NetworkEntity entity, bool isUnload)Handler for DestroyedByScene. Plays the fade-out unless the entity is only being unloaded.