Modular Character System
  • Overview
  • Setup
  • Demo Scenes
  • System Overview
    • Modular Character
    • Wearable
    • Wearable Set
      • Character Preset
      • Wearable Set Data
    • Wearable Database
    • Character Style
    • Cosmetic Styles
      • Skin Style
      • Eye Style
    • Character Morphs
  • Troubleshooting
  • Asset Updates
  • Reference
    • Scripting Guide
      • Modular Character Manager Functions
        • Wearables
          • EquipWearable
          • RemoveWearable
        • Wearable Sets
          • EquipWearableSet
          • EquipWearablePreset
          • RevertSetToDefaults
          • GenerateRandomSetFromDatabase
        • Materials
          • SetWearableMaterial
          • SetWearableMaterialArray
          • SetEyeStyle
          • SetSkinStyle
          • SetBodyMaterial
          • SetFaceMaterial
          • SetEyeMaterial
        • Character Morphs
          • SetBlendshapeOnAllMeshes
          • UpdateSetMorphValues
          • ApplySetMorphValuesToCurrentSet
          • ApplyCurrentMorphValuesToNew...
        • Face Merging
          • MergeFace
          • UnmergeFace
          • DestroyMergedFace
        • Saving and Loading
          • SaveCharacterPrefab
          • SaveCharacterPreset
          • SaveDataAsJSON
          • LoadCharacterFromJSON
      • Character Style Functions
        • GetAllWearablesOfCategory
        • GetAllNonDefaultWearablesOfCategory
        • GetWearableByName
        • CheckIfDefaultItem
      • Hidden Wearable Manager Functions
        • SetSlotStatusFromManagerType
        • AddWearableSlotToHiddenList
        • CheckHiddenListForWearable
  • Changelog
  • EXTERNAL LINKS
    • Stellar Game Assets Website
    • Join me on Discord
Powered by GitBook
On this page
  1. Reference
  2. Scripting Guide
  3. Modular Character Manager Functions
  4. Materials

SetWearableMaterial

ModularCharacterManager.SetWearableMaterial

Declaration public void SetWearableToNewMaterial(int _slotIndex, int _arrayIndex, Material _material);

Parameters

Parameter
Description

int _slotIndex

The slot of the Wearable you want to add the new Material to.

int _arrayIndex,

The index of the Material you want to swap

Material _newMaterial

The new Material you want to apply.

Description The public function to replace the current material on a Wearable currently equipped to a particular slot with another material. Equips the referenced Material to the specified array on the mesh of the Wearable in the specified slot.

Declaration public void SetWearableToNewMaterial(int _slotIndex, int _arrayIndex, int _materialIndex);

Parameters

Parameter
Description

int _slotIndex

The slot of the Wearable you want to add the new Material to.

int _arrayIndex,

The index of the Material you want to swap

int _materialIndex,

The index of the Material in the Wearable's Available Material array, at the slot of the arrayIndex.

Description The public function to replace current material on a Wearable currently equipped to a particular slot with another material using slot and index references

PreviousMaterialsNextSetWearableMaterialArray

Last updated 2 months ago