Skip to main content

PathModelDisplay

A class in Root.Township, the global namespace.

Skill shrine visualizer that shows a profession path's 3D model with a dissolve-in cone effect. Client-side; it does nothing on a headless server.

Constructors​

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

Fields​

11 private and internal fields
MemberWhat it is
private readonly int _ProgressShader property ID for the dissolve progress.
private DurationCurve animationSettingsDuration and curve of the show and hide animation.
private Material baseMaterialMaterial copied onto the path model.
private Material coneMaterialCopied material on the cone renderer.
private Renderer coneRendererThe spawned cone renderer.
private Transform coneRendererParentWhere the cone is spawned.
private Renderer coneRendererPrefabPrefab for the cone renderer.
private ProgressionPath currentlyOpenPathThe path whose model is shown.
private bool isOpenTrue while a model is shown.
private GameObject modelThe spawned path model.
private Material modelMaterialCopied material on the path model.

Methods​

MemberWhat it is
override void Disable()Client: plays the hide animation and marks the display closed.
override void PrepareOnServer(PlayerProgressionManager progressionManager)Shows the model on a host that isn't headless.
override void Serialize(Stream stream, PlayerProgressionManager manager)Shows the model when a remote client reads the shrine's state.
2 private and internal methods
MemberWhat it is
private IEnumerator Animate(bool isStarting) (iterator)Coroutine that animates _Progress on the model and cone materials in or out, destroying the model when hiding.
private void InstantiateModel(ProgressionPath newPath)Client: spawns the path's model from its profession tree with a copied material, then animates it in.