public virtual void ChangeMaterialProperty() { NamedMaterialPropertyNames prop = ca.MaterialProperty; int propInt = (int)prop; propInt++; propInt = propInt % 5; ca.MaterialProperty = (NamedMaterialPropertyNames)propInt; UpdateLabel(); }
protected virtual void CheckForPropertyChanges() { if (UseSharedMaterials != useSharedMaterials) { OnUseSharedMaterialsChanged(); } if (AnimateChildren != animateChildren) { OnAnimateChildrenChanged(); } if (excludeParticleSystems != ExcludeParticleSystems) { OnExcludeParticleSystemChanged(); } if (MaterialProperty != currentMaterialProperty) { ResetColors(); currentMaterialProperty = MaterialProperty; MaterialPropertyName = ""; if (OnMaterialPropertyChanged != null) { OnMaterialPropertyChanged.Invoke(); } } else { if (MaterialPropertyName != currentMaterialPropertyName) { ResetColors(); currentMaterialPropertyName = MaterialPropertyName; if (OnMaterialPropertyChanged != null) { OnMaterialPropertyChanged.Invoke(); } } } }