SCILLBattlePassLevelChallenges

public class SCILLBattlePassLevelChallenges : MonoBehaviour

Overview

Battle Passes have a number of levels and each level has challenges attached that need to be achieved before the level is completed and the next level is unlocked.

Use this component to render a list of active challenges, i.e. the challenges from the current level. Set the challengePrefab to a prefab that has the SCILLBattlePassChallengeItem item attached.

Only active challenges will be rendered, i.e. those challenges that have a in-progress type. It is intended to be shown in the games HUD and to be always visible, so gamers can quickly see what they should do next. However, you can override this class and implement basic logic to your liking, too.

Inspector properties

challengePrefab

public SCILLBattlePassChallengeItem challengePrefab;

Choose a Challenge Prefab that has the SCILLBattlePassChallengeItem script attached. This prefab is instantiated for each challenge in the current battle pass level and will be either added as a child to this transform or if provided, to the challengeContainer transform.

completedChallengePrefab

public SCILLBattlePassChallengeItem completedChallengePrefab;

Choose a Challenge Prefab that has the SCILLBattlePassChallengeItem script attached. This prefab is instantiated for each completed challenge in the current battle pass level and will be either added as a child to this transform or if provided, to the challengeContainer transform.

challengeContainer

public Transform challengeContainer;

Connect a transform that will be used as the container for the challenge. If left blank, the challengePrefab items will be added to this game object. The container will be hidden if no challenges are available.

Virtual methods

ClearChallenges

protected virtual void ClearChallenges()

This class will clear all game objects from the challengeContainer or this class if no container is set. Override this function in your own class if you want to adjust this.

UpdateChallengeList

protected virtual void UpdateChallengeList()

This class will create instances of the challengePrefab and will add them to the challengeContainer or this objects transform if no container is set. Only in-progress challenges will be rendered per default.