Modular 3D Ranks
  • Getting Started
  • ๐Ÿ‘๏ธThe Inspector
    • โšซMaterial Shortcuts
  • ๐ŸŽ–๏ธRank
    • โญIcon
      • Create New Icon
    • ๐Ÿ”ณBorder
      • Create New Border
      • โ—พInside
    • ๐ŸชฝWings
      • Create New Wings
  • ๐ŸงบSpawn Animations
    • Create New Spawn Animation
  • ๐Ÿ“œScripting References
    • class Rank
      • struct Body
        • struct Inside
        • enum ExitAnimationType
        • enum EntryAnimationType
    • public class Wing
  • Just FYI
    • Full Mesh Information
Powered by GitBook
On this page
  • Public Variables
  • Methods

Scripting References

namespace TinyGiantStudio.Ranks

Everything is controlled by the RanksAnimationController.cs file.

Public Variables

Variable
Description

The default animation that plays when this GameObject spawns or becomes active. 0 is none, 1 is breathing, and others are different spawn animations.

List of all Ranks.

When a new rank is applied, its index in the ranks list is compared to this value and is used to determine whether to call Upgrade or Downgrade particles.

It is a copy of the last applied rank, plus any modifications made manually. When applying a new rank, some rank variables don't need to be copied from the ranks list. So, if you require accurate information, getting the rank from the ranks list is better.

A list of all borders with their supported insides and correct position, and rotation for wings.

A list of everything required for wings to work.

An array of materials that are available as a shortcut in the Customize tab. Different methods can use the index of these materials to set them to the border, the inside, and the wings.

Methods

Method
Description

Plays an animation on the animator on the root of the game object.

Retrieves the rank from the ranks list at the specified index and applies it.

If an invalid index is passed, it logs a warning message and returns. Doesn't print an error.

Applies a rank from the ranks list by its exact name. If the rank is not found or the name is invalid, a warning is logged.

Applies the rank passed as parameter.

Applies icon with the target rank's settings.

Applies icon with the currentRank's animation settings.

Removes icon. This is same as calling SetIcon(0);

It applies the icon skipping any animation settings in the current rank.

Retrieves the appropriate material from the materials list based on the given index and applies it to the icon.

Applies the material passed as parameter to the icon.

Retrieves the appropriate material from the materials list based on the given index and applies it to the icon.

Applies the material passed as parameter to the icon.

Removes border and inside.

Updates the border with the currentRank's border animation setting. Parameters: int newBorder Will disable the border if a negative value is passed as a parameter. bool autoUpdateInside = true If the current inside isn't viable for the new border, auto update will assign a new one. bool autoUpdateWingsPosition = true If wings are changed along with this, set it false so that this doesn't handle updating the position and changing wings updates that.

Retrieves the appropriate material from the materials list based on the given index and applies it to the border

Applies the material passed as parameter to the border.

Removes inside.

Applies new inside according to currentRank's animation settings.

Applies new inside according to currentRank's animation settings.

Retrieves the appropriate material from the materials list based on the given index and applies it to the inside

Applies the material passed as parameter to the inside.

Removes Wings

Retrieves the appropriate material from the materials list based on the given index and applies it to the wings

Applies the material passed as parameter to the wings.

Removes icon, border, inside and wings.

PreviousCreate New Spawn AnimationNextclass Rank

Last updated 1 month ago

๐Ÿ“œ
int defaultSpawnAnimation;
List<Rank> ranks;
int currentRankIndex;
Rank currentRank;
Body[] bodies;
Wing[] wings;
Material[] materials;
bool enableUpgradeEffect;
ParticleSystem upgradeParticle; 
VisualEffect upgradeVisualEffect;
bool enableDowngradeEffect;
ParticleSystem downgradeParticle;
VisualEffect downgradeVisualEffect;
PlaySpawnAnimation(int target)
ApplyRank(int index)
ApplyRank(string rankName)
ApplyRank(Rank targetRank)
SetIcon(Rank targetRank);
SetIcon(int icon);
DisableIcon()
SetIconDirectly(int icon);
SetIconPrimaryMaterial(int i)
SetIconPrimaryMaterial(Material material)
SetIconSecondaryMaterial(int i)
SetIconSecondaryMaterial(Material material)
DisableBorder()
SetBorder(int newBorder, 
bool autoUpdateInside = true, 
bool autoUpdateWingsPosition = true)
SetBorderMaterials(int i)
SetBorderMaterials(Material material)
DisableInside()
SetInside(int i)
SetInside(Inside newInside)
 SetInsideMaterial(int i)
 SetInsideMaterial(Material material)
 DisableWings()
 SetWing(int i)
 SetWingsMaterial(int i)
 SetWingsMaterial(Material mat)
 DisableEverything()