public override void Setup()
        {
            base.Setup();

            _originalMaterials = SFX_MaterialUtil.GetOriginalMaterials(gameObject);
            SFX_MaterialUtil.ReplaceMaterial(gameObject, Material);
        }
Example #2
0
        private void GetMaterialsAndFillCollection(GameObject targetGo)
        {
            var rendToMaterials = SFX_MaterialUtil.GetOriginalMaterials(targetGo);

            foreach (var rToMat in rendToMaterials)
            {
                _rendToMaterialsMap[rToMat.Key] = rToMat.Value;
            }
            SFX_MaterialUtil.AddMaterial(targetGo, Material);
        }