Skill
🧩 Skill Class
Represents a skill data container with icons, dataset integration, and database persistence.
Namespace:
Esper.SkillWebAccess:publicType:classInherits:SkillWebObject
📦 Fields
public
skillName
string
Searchable name of the skill.
public
maxLevel
int
Maximum skill level (default 1).
public
levelRequirement
int
Player level required to unlock the skill.
public
tagIndex
int
Index of the skill tag.
public
lockedIcon
SkillIcon
Icon shown when skill is locked.
public
unlockedIcon
SkillIcon
Icon shown when skill is unlocked.
public
obtainedIcon
SkillIcon
Icon shown when skill is obtained.
public
maxedIcon
SkillIcon
Icon shown when skill is maxed.
public
size
Size
Size of the skill in UI.
public
demoClip
VideoClip
Video clip demonstrating the skill.
public
dataset
SkillDataset
Associated dataset.
public static
resourcesPath
string
Path to generated objects relative to Resources folder.
🔍 Properties
public
Tag
string
Gets or sets the skill tag by index.
public
DatabaseRecord
SkillRecord
Database record containing id, objectName, skillName, size, and tag.
public static (Editor only)
DirectoryPath
string
Directory path for generated skill assets.
🧰 Methods
public
UpdateDatabaseRecord()
void
Insert or update this skill’s record in the database.
public
GetIcon(State state, bool useFallback)
SkillIcon
Returns the icon for a given state, with fallback logic.
public
GenerateDataset()
void
Generates a dataset asset (editor only).
public
GenerateDatasetCopy(Skill skill)
SkillDataset
Creates a dataset copy for another skill.
public static
Create()
Skill
Creates a new skill instance (editor only).
public static
CreateCopy(Skill original)
Skill
Creates a copy of an existing skill (editor only).
public
UpdateAssetName()
void
Updates the asset name in the editor.
public override
Save()
void
Saves the asset and updates its database record.
protected override
GetID<T>(string pathInResources = null)
int
Returns a unique ID using resourcesPath.
public (Editor only)
DeleteDatabaseRecord()
void
Deletes this skill’s record from the database.
public static (Editor only)
GetFullPath(Skill skill)
string
Returns full asset path for a skill.
🧩 Nested Structs
public struct SkillIcon
Represents a skill icon.
public
icon
Sprite
The icon.
public
color
Color
The color tint of the icon.
🧩 Nested Enums
public enum State
The state of a skill.
Locked
Currently unobtainable. A skill is unobtainable if the level or connection requirement is not met.
Unlocked
The skill can be obtained.
Obtained
The skill has been obtained.
Maxed
The skill's level has been maxed.
public enum Size
The size of a skill.
Tiny
Tiny size.
Small
Small size.
Medium
Medium size.
Large
Large size.
Giant
Giant size.
Creating a Skill
Getting a Skill
You can get a skill with the SkillWeb.GetSkill method by passing the ID or name of the skill as a parameter.
To get all skills, use SkillWeb.GetAllSkills. Note: this can be a lengthy task.
Custom Dataset
It's recommended to create a custom dataset for your skills. This allows you to set custom data for each skill—making customization easier.
Step 1: Inherit From SkillDataset
Create a new class and inherit from the SkillDataset class.
Optionally, you can inherit from DefaultSkillDataset to use the default method of getting the skill name, description, and subtext.
Step 2: Create Asset Menu Option
SkillDataset is a ScriptableObject class, which means it can be added to the asset menu.
Step 3: Override Methods
Override the required methods. These are used by the Skill Hovercard UGUI to get the texts, but how you use them is up to you.
Step 4: Add Custom Fields
Add your custom fields. If they are serializable, they will be available for each skill in the Skill Bank.
Step 5: Set For All Skills
All you have left to do now is to create a new instance of your custom dataset from the asset menu and set it as the dataset reference for skills from Settings.
Last updated