Browse Source

Add materialUpdatePending in AnimatedSprite2D and ParticleEmitter2D.

aster2013 11 years ago
parent
commit
b1dca8c19d

+ 2 - 0
Source/Engine/Urho2D/AnimatedSprite2D.cpp

@@ -126,6 +126,8 @@ Animation2D* AnimatedSprite2D::GetAnimation() const
 
 void AnimatedSprite2D::SetAnimationAttr(ResourceRef value)
 {
+    materialUpdatePending_ = true;
+    
     ResourceCache* cache = GetSubsystem<ResourceCache>();
     SetAnimation(cache->GetResource<Animation2D>(value.name_));
 }

+ 2 - 0
Source/Engine/Urho2D/ParticleEmitter2D.cpp

@@ -156,6 +156,8 @@ ParticleModel2D* ParticleEmitter2D::GetModel() const
 
 void ParticleEmitter2D::SetParticleModelAttr(ResourceRef value)
 {
+    materialUpdatePending_ = true;
+    
     ResourceCache* cache = GetSubsystem<ResourceCache>();
     SetModel(cache->GetResource<ParticleModel2D>(value.name_));
 }