Ggwppino Posted May 16, 2021 Share Posted May 16, 2021 (edited) Hi! I'm trying to figure out how shield variants work, but I just can't figure it out. I think I found the code where the correct item is spawned: GetComponent<Renderer>().material.SetFloat("_Style", style); //in ItemStyle.csand base.gameObject.GetComponentInChildren<IEquipmentVisual>()?.Setup(m_itemData.m_variant); //in ItemDrop.Start() `m_variant` is an integer that can be modified in Inspector in ItemDrop. Now: if what i found is actually the application of the shield variant, how does it handle the materials? If I search for the BlackMetalShield prefab and its materials in Unity, I cannot find variants of materials, textures or other prefabs. I'm definitely missing something, and being new to c # and unity doesn't help me. I was hoping it was as simple as adding DamageModPair to weapons. but I've been banging my head for days.Ty dudesEDIT: nvm, I just had to create a custom shader Edited May 19, 2021 by Ggwppino Link to comment Share on other sites More sharing options...
Recommended Posts